diff --git a/.travis.yml b/.travis.yml index 1d14ff9..755978d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: go -go: 1.9 -install: make install-dependencies +install: + - go get -d -v . -script: make test +script: + - go build -v ./ diff --git a/CODEOWNERS b/CODEOWNERS index ad1f761..d8a1939 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ * @ekta-slit -* @jain-raunak +* @jain-raunak \ No newline at end of file diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 46bcca2..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,2 +0,0 @@ -# TODO -# Currently our dependencies don't specify semver. \ No newline at end of file diff --git a/LICENSE b/LICENSE index b2588f8..fed5fe1 100644 --- a/LICENSE +++ b/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 6cff5d3..4669350 100644 --- a/README.md +++ b/README.md @@ -8,26 +8,25 @@ SendinBlue's API matches the [OpenAPI v2 definition](https://www.openapis.org/). This Golang package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project and is reviewed and maintained by SendinBlue: - API version: 3.x.x -- Package version: 2.0.1 +- Package version: 2.1.0 - Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen For more information, please visit [https://account.sendinblue.com/support](https://account.sendinblue.com/support) ## Installation & Usage Install the package to your GoLang project. ```golang -go get github.com/sendinblue/APIv3-go-library +go get github.com/sendinblue/APIv3-go-library/v2 ``` ## Getting Started Please follow the [installation procedure](#installation--usage) and then run the following: - ```golang package main import ( "fmt" "context" - sendinblue "github.com/sendinblue/APIv3-go-library/lib" + sendinblue "github.com/sendinblue/APIv3-go-library/v2/lib" ) func main() { @@ -55,11 +54,29 @@ All URIs are relative to *https://api.sendinblue.com/v3* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AccountApi* | [**GetAccount**](docs/AccountApi.md#getaccount) | **Get** /account | Get your account information, plan and credits details +*AccountApi* | [**GetAccount**](docs/AccountApi.md#Getaccount) | **Get** /account | Get your account information, plan and credits details *AttributesApi* | [**CreateAttribute**](docs/AttributesApi.md#createattribute) | **Post** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute *AttributesApi* | [**DeleteAttribute**](docs/AttributesApi.md#deleteattribute) | **Delete** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute *AttributesApi* | [**GetAttributes**](docs/AttributesApi.md#getattributes) | **Get** /contacts/attributes | List all attributes *AttributesApi* | [**UpdateAttribute**](docs/AttributesApi.md#updateattribute) | **Put** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute +*CRMApi* | [**CrmNotesGet**](docs/CRMApi.md#crmnotesget) | **Get** /crm/notes | Get all notes +*CRMApi* | [**CrmNotesIdDelete**](docs/CRMApi.md#crmnotesiddelete) | **Delete** /crm/notes/{id} | Delete a note +*CRMApi* | [**CrmNotesIdGet**](docs/CRMApi.md#crmnotesidget) | **Get** /crm/notes/{id} | Get a note +*CRMApi* | [**CrmNotesIdPatch**](docs/CRMApi.md#crmnotesidpatch) | **Patch** /crm/notes/{id} | Update a note +*CRMApi* | [**CrmNotesPost**](docs/CRMApi.md#crmnotespost) | **Post** /crm/notes | Create a note +*CRMApi* | [**CrmTasksGet**](docs/CRMApi.md#crmtasksget) | **Get** /crm/tasks | Get all tasks +*CRMApi* | [**CrmTasksIdDelete**](docs/CRMApi.md#crmtasksiddelete) | **Delete** /crm/tasks/{id} | Delete a task +*CRMApi* | [**CrmTasksIdGet**](docs/CRMApi.md#crmtasksidget) | **Get** /crm/tasks/{id} | Get a task +*CRMApi* | [**CrmTasksIdPatch**](docs/CRMApi.md#crmtasksidpatch) | **Patch** /crm/tasks/{id} | Update a task +*CRMApi* | [**CrmTasksPost**](docs/CRMApi.md#crmtaskspost) | **Post** /crm/tasks | Create a task +*CRMApi* | [**CrmTasktypesGet**](docs/CRMApi.md#crmtasktypesget) | **Get** /crm/tasktypes | Get all task types +*CompaniesApi* | [**CompaniesAttributesGet**](docs/CompaniesApi.md#companiesattributesget) | **Get** /companies/attributes | Get company attributes +*CompaniesApi* | [**CompaniesGet**](docs/CompaniesApi.md#companiesget) | **Get** /companies | Get all companies +*CompaniesApi* | [**CompaniesIdDelete**](docs/CompaniesApi.md#companiesiddelete) | **Delete** /companies/{id} | Delete a company +*CompaniesApi* | [**CompaniesIdGet**](docs/CompaniesApi.md#companiesidget) | **Get** /companies/{id} | Get a company +*CompaniesApi* | [**CompaniesIdPatch**](docs/CompaniesApi.md#companiesidpatch) | **Patch** /companies/{id} | Update a company +*CompaniesApi* | [**CompaniesLinkUnlinkIdPatch**](docs/CompaniesApi.md#companieslinkunlinkidpatch) | **Patch** /companies/link-unlink/{id} | Link and Unlink company with contacts and deals +*CompaniesApi* | [**CompaniesPost**](docs/CompaniesApi.md#companiespost) | **Post** /companies | Create a company *ContactsApi* | [**AddContactToList**](docs/ContactsApi.md#addcontacttolist) | **Post** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list *ContactsApi* | [**CreateAttribute**](docs/ContactsApi.md#createattribute) | **Post** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute *ContactsApi* | [**CreateContact**](docs/ContactsApi.md#createcontact) | **Post** /contacts | Create a contact @@ -71,22 +88,30 @@ Class | Method | HTTP request | Description *ContactsApi* | [**DeleteFolder**](docs/ContactsApi.md#deletefolder) | **Delete** /contacts/folders/{folderId} | Delete a folder (and all its lists) *ContactsApi* | [**DeleteList**](docs/ContactsApi.md#deletelist) | **Delete** /contacts/lists/{listId} | Delete a list *ContactsApi* | [**GetAttributes**](docs/ContactsApi.md#getattributes) | **Get** /contacts/attributes | List all attributes -*ContactsApi* | [**GetContactInfo**](docs/ContactsApi.md#getcontactinfo) | **Get** /contacts/{identifier} | Get a contact's details -*ContactsApi* | [**GetContactStats**](docs/ContactsApi.md#getcontactstats) | **Get** /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact +*ContactsApi* | [**GetContactInfo**](docs/ContactsApi.md#getcontactinfo) | **Get** /contacts/{identifier} | Get a contact's details +*ContactsApi* | [**GetContactStats**](docs/ContactsApi.md#getcontactstats) | **Get** /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact *ContactsApi* | [**GetContacts**](docs/ContactsApi.md#getcontacts) | **Get** /contacts | Get all the contacts *ContactsApi* | [**GetContactsFromList**](docs/ContactsApi.md#getcontactsfromlist) | **Get** /contacts/lists/{listId}/contacts | Get contacts in a list -*ContactsApi* | [**GetFolder**](docs/ContactsApi.md#getfolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details +*ContactsApi* | [**GetFolder**](docs/ContactsApi.md#getfolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details *ContactsApi* | [**GetFolderLists**](docs/ContactsApi.md#getfolderlists) | **Get** /contacts/folders/{folderId}/lists | Get lists in a folder *ContactsApi* | [**GetFolders**](docs/ContactsApi.md#getfolders) | **Get** /contacts/folders | Get all folders -*ContactsApi* | [**GetList**](docs/ContactsApi.md#getlist) | **Get** /contacts/lists/{listId} | Get a list's details +*ContactsApi* | [**GetList**](docs/ContactsApi.md#getlist) | **Get** /contacts/lists/{listId} | Get a list's details *ContactsApi* | [**GetLists**](docs/ContactsApi.md#getlists) | **Get** /contacts/lists | Get all the lists *ContactsApi* | [**ImportContacts**](docs/ContactsApi.md#importcontacts) | **Post** /contacts/import | Import contacts *ContactsApi* | [**RemoveContactFromList**](docs/ContactsApi.md#removecontactfromlist) | **Post** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list *ContactsApi* | [**RequestContactExport**](docs/ContactsApi.md#requestcontactexport) | **Post** /contacts/export | Export contacts *ContactsApi* | [**UpdateAttribute**](docs/ContactsApi.md#updateattribute) | **Put** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute +*ContactsApi* | [**UpdateBatchContacts**](docs/ContactsApi.md#updatebatchcontacts) | **Post** /contacts/batch | Update multiple contacts *ContactsApi* | [**UpdateContact**](docs/ContactsApi.md#updatecontact) | **Put** /contacts/{identifier} | Update a contact *ContactsApi* | [**UpdateFolder**](docs/ContactsApi.md#updatefolder) | **Put** /contacts/folders/{folderId} | Update a folder *ContactsApi* | [**UpdateList**](docs/ContactsApi.md#updatelist) | **Put** /contacts/lists/{listId} | Update a list +*DealsApi* | [**CrmAttributesDealsGet**](docs/DealsApi.md#crmattributesdealsget) | **Get** /crm/attributes/deals | Get deal attributes +*DealsApi* | [**CrmDealsGet**](docs/DealsApi.md#crmdealsget) | **Get** /crm/deals | Get all deals +*DealsApi* | [**CrmDealsIdDelete**](docs/DealsApi.md#crmdealsiddelete) | **Delete** /crm/deals/{id} | Delete a deal +*DealsApi* | [**CrmDealsIdGet**](docs/DealsApi.md#crmdealsidget) | **Get** /crm/deals/{id} | Get a deal +*DealsApi* | [**CrmDealsIdPatch**](docs/DealsApi.md#crmdealsidpatch) | **Patch** /crm/deals/{id} | Update a deal +*DealsApi* | [**CrmDealsPost**](docs/DealsApi.md#crmdealspost) | **Post** /crm/deals | Create a deal +*DealsApi* | [**CrmPipelineDetailsGet**](docs/DealsApi.md#crmpipelinedetailsget) | **Get** /crm/pipeline/details | Get pipeline stages *EmailCampaignsApi* | [**CreateEmailCampaign**](docs/EmailCampaignsApi.md#createemailcampaign) | **Post** /emailCampaigns | Create an email campaign *EmailCampaignsApi* | [**DeleteEmailCampaign**](docs/EmailCampaignsApi.md#deleteemailcampaign) | **Delete** /emailCampaigns/{campaignId} | Delete an email campaign *EmailCampaignsApi* | [**EmailExportRecipients**](docs/EmailCampaignsApi.md#emailexportrecipients) | **Post** /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign @@ -99,22 +124,31 @@ Class | Method | HTTP request | Description *EmailCampaignsApi* | [**SendTestEmail**](docs/EmailCampaignsApi.md#sendtestemail) | **Post** /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list *EmailCampaignsApi* | [**UpdateCampaignStatus**](docs/EmailCampaignsApi.md#updatecampaignstatus) | **Put** /emailCampaigns/{campaignId}/status | Update an email campaign status *EmailCampaignsApi* | [**UpdateEmailCampaign**](docs/EmailCampaignsApi.md#updateemailcampaign) | **Put** /emailCampaigns/{campaignId} | Update an email campaign -*EmailCampaignsApi* | [**UploadImageToGallery**](docs/EmailCampaignsApi.md#uploadimagetogallery) | **Post** /emailCampaigns/images | Upload an image to your account's image gallery +*EmailCampaignsApi* | [**UploadImageToGallery**](docs/EmailCampaignsApi.md#uploadimagetogallery) | **Post** /emailCampaigns/images | Upload an image to your account's image gallery *FoldersApi* | [**CreateFolder**](docs/FoldersApi.md#createfolder) | **Post** /contacts/folders | Create a folder *FoldersApi* | [**DeleteFolder**](docs/FoldersApi.md#deletefolder) | **Delete** /contacts/folders/{folderId} | Delete a folder (and all its lists) -*FoldersApi* | [**GetFolder**](docs/FoldersApi.md#getfolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details +*FoldersApi* | [**GetFolder**](docs/FoldersApi.md#getfolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details *FoldersApi* | [**GetFolderLists**](docs/FoldersApi.md#getfolderlists) | **Get** /contacts/folders/{folderId}/lists | Get lists in a folder *FoldersApi* | [**GetFolders**](docs/FoldersApi.md#getfolders) | **Get** /contacts/folders | Get all folders *FoldersApi* | [**UpdateFolder**](docs/FoldersApi.md#updatefolder) | **Put** /contacts/folders/{folderId} | Update a folder +*InboundParsingApi* | [**GetInboundEmailEvents**](docs/InboundParsingApi.md#getinboundemailevents) | **Get** /inbound/events | Get the list of all the events for the received emails. +*InboundParsingApi* | [**GetInboundEmailEventsByUuid**](docs/InboundParsingApi.md#getinboundemaileventsbyuuid) | **Get** /inbound/events/{uuid} | Fetch all events history for one particular received email. *ListsApi* | [**AddContactToList**](docs/ListsApi.md#addcontacttolist) | **Post** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list *ListsApi* | [**CreateList**](docs/ListsApi.md#createlist) | **Post** /contacts/lists | Create a list *ListsApi* | [**DeleteList**](docs/ListsApi.md#deletelist) | **Delete** /contacts/lists/{listId} | Delete a list *ListsApi* | [**GetContactsFromList**](docs/ListsApi.md#getcontactsfromlist) | **Get** /contacts/lists/{listId}/contacts | Get contacts in a list *ListsApi* | [**GetFolderLists**](docs/ListsApi.md#getfolderlists) | **Get** /contacts/folders/{folderId}/lists | Get lists in a folder -*ListsApi* | [**GetList**](docs/ListsApi.md#getlist) | **Get** /contacts/lists/{listId} | Get a list's details +*ListsApi* | [**GetList**](docs/ListsApi.md#getlist) | **Get** /contacts/lists/{listId} | Get a list's details *ListsApi* | [**GetLists**](docs/ListsApi.md#getlists) | **Get** /contacts/lists | Get all the lists *ListsApi* | [**RemoveContactFromList**](docs/ListsApi.md#removecontactfromlist) | **Post** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list *ListsApi* | [**UpdateList**](docs/ListsApi.md#updatelist) | **Put** /contacts/lists/{listId} | Update a list +*MasterAccountApi* | [**CorporateMasterAccountGet**](docs/MasterAccountApi.md#corporatemasteraccountget) | **Get** /corporate/masterAccount | Get the details of requested master account +*MasterAccountApi* | [**CorporateSubAccountGet**](docs/MasterAccountApi.md#corporatesubaccountget) | **Get** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +*MasterAccountApi* | [**CorporateSubAccountIdDelete**](docs/MasterAccountApi.md#corporatesubaccountiddelete) | **Delete** /corporate/subAccount/{id} | Delete a sub-account +*MasterAccountApi* | [**CorporateSubAccountIdGet**](docs/MasterAccountApi.md#corporatesubaccountidget) | **Get** /corporate/subAccount/{id} | Get sub-account details +*MasterAccountApi* | [**CorporateSubAccountIdPlanPut**](docs/MasterAccountApi.md#corporatesubaccountidplanput) | **Put** /corporate/subAccount/{id}/plan | Update sub-account plan +*MasterAccountApi* | [**CorporateSubAccountPost**](docs/MasterAccountApi.md#corporatesubaccountpost) | **Post** /corporate/subAccount | Create a new sub-account under a master account. +*MasterAccountApi* | [**CorporateSubAccountSsoTokenPost**](docs/MasterAccountApi.md#corporatesubaccountssotokenpost) | **Post** /corporate/subAccount/ssoToken | Generate SSO token to access Sendinblue *ProcessApi* | [**GetProcess**](docs/ProcessApi.md#getprocess) | **Get** /processes/{processId} | Return the informations for a process *ProcessApi* | [**GetProcesses**](docs/ProcessApi.md#getprocesses) | **Get** /processes | Return all the processes for your account *ResellerApi* | [**AddCredits**](docs/ResellerApi.md#addcredits) | **Post** /reseller/children/{childIdentifier}/credits/add | Add Email and/or SMS credits to a specific child account @@ -124,25 +158,25 @@ Class | Method | HTTP request | Description *ResellerApi* | [**DeleteChildDomain**](docs/ResellerApi.md#deletechilddomain) | **Delete** /reseller/children/{childIdentifier}/domains/{domainName} | Delete the sender domain of the reseller child based on the childIdentifier and domainName passed *ResellerApi* | [**DeleteResellerChild**](docs/ResellerApi.md#deleteresellerchild) | **Delete** /reseller/children/{childIdentifier} | Delete a single reseller child based on the child identifier supplied *ResellerApi* | [**DissociateIpFromChild**](docs/ResellerApi.md#dissociateipfromchild) | **Post** /reseller/children/{childIdentifier}/ips/dissociate | Dissociate a dedicated IP to the child -*ResellerApi* | [**GetChildAccountCreationStatus**](docs/ResellerApi.md#getchildaccountcreationstatus) | **Get** /reseller/children/{childIdentifier}/accountCreationStatus | Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied +*ResellerApi* | [**GetChildAccountCreationStatus**](docs/ResellerApi.md#getchildaccountcreationstatus) | **Get** /reseller/children/{childIdentifier}/accountCreationStatus | Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied *ResellerApi* | [**GetChildDomains**](docs/ResellerApi.md#getchilddomains) | **Get** /reseller/children/{childIdentifier}/domains | Get all sender domains for a specific child account -*ResellerApi* | [**GetChildInfo**](docs/ResellerApi.md#getchildinfo) | **Get** /reseller/children/{childIdentifier} | Get a child account's details +*ResellerApi* | [**GetChildInfo**](docs/ResellerApi.md#getchildinfo) | **Get** /reseller/children/{childIdentifier} | Get a child account's details *ResellerApi* | [**GetResellerChilds**](docs/ResellerApi.md#getresellerchilds) | **Get** /reseller/children | Get the list of all children accounts *ResellerApi* | [**GetSsoToken**](docs/ResellerApi.md#getssotoken) | **Get** /reseller/children/{childIdentifier}/auth | Get session token to access Sendinblue (SSO) *ResellerApi* | [**RemoveCredits**](docs/ResellerApi.md#removecredits) | **Post** /reseller/children/{childIdentifier}/credits/remove | Remove Email and/or SMS credits from a specific child account -*ResellerApi* | [**UpdateChildAccountStatus**](docs/ResellerApi.md#updatechildaccountstatus) | **Put** /reseller/children/{childIdentifier}/accountStatus | Update info of reseller's child account status based on the childIdentifier supplied -*ResellerApi* | [**UpdateChildDomain**](docs/ResellerApi.md#updatechilddomain) | **Put** /reseller/children/{childIdentifier}/domains/{domainName} | Update the sender domain of reseller's child based on the childIdentifier and domainName passed -*ResellerApi* | [**UpdateResellerChild**](docs/ResellerApi.md#updateresellerchild) | **Put** /reseller/children/{childIdentifier} | Update info of reseller's child based on the child identifier supplied +*ResellerApi* | [**UpdateChildAccountStatus**](docs/ResellerApi.md#updatechildaccountstatus) | **Put** /reseller/children/{childIdentifier}/accountStatus | Update info of reseller's child account status based on the childIdentifier supplied +*ResellerApi* | [**UpdateChildDomain**](docs/ResellerApi.md#updatechilddomain) | **Put** /reseller/children/{childIdentifier}/domains/{domainName} | Update the sender domain of reseller's child based on the childIdentifier and domainName passed +*ResellerApi* | [**UpdateResellerChild**](docs/ResellerApi.md#updateresellerchild) | **Put** /reseller/children/{childIdentifier} | Update info of reseller's child based on the child identifier supplied *SMSCampaignsApi* | [**CreateSmsCampaign**](docs/SMSCampaignsApi.md#createsmscampaign) | **Post** /smsCampaigns | Creates an SMS campaign *SMSCampaignsApi* | [**DeleteSmsCampaign**](docs/SMSCampaignsApi.md#deletesmscampaign) | **Delete** /smsCampaigns/{campaignId} | Delete an SMS campaign *SMSCampaignsApi* | [**GetSmsCampaign**](docs/SMSCampaignsApi.md#getsmscampaign) | **Get** /smsCampaigns/{campaignId} | Get an SMS campaign *SMSCampaignsApi* | [**GetSmsCampaigns**](docs/SMSCampaignsApi.md#getsmscampaigns) | **Get** /smsCampaigns | Returns the information for all your created SMS campaigns -*SMSCampaignsApi* | [**RequestSmsRecipientExport**](docs/SMSCampaignsApi.md#requestsmsrecipientexport) | **Post** /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients +*SMSCampaignsApi* | [**RequestSmsRecipientExport**](docs/SMSCampaignsApi.md#requestsmsrecipientexport) | **Post** /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients *SMSCampaignsApi* | [**SendSmsCampaignNow**](docs/SMSCampaignsApi.md#sendsmscampaignnow) | **Post** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately -*SMSCampaignsApi* | [**SendSmsReport**](docs/SMSCampaignsApi.md#sendsmsreport) | **Post** /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report +*SMSCampaignsApi* | [**SendSmsReport**](docs/SMSCampaignsApi.md#sendsmsreport) | **Post** /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report *SMSCampaignsApi* | [**SendTestSms**](docs/SMSCampaignsApi.md#sendtestsms) | **Post** /smsCampaigns/{campaignId}/sendTest | Send a test SMS campaign *SMSCampaignsApi* | [**UpdateSmsCampaign**](docs/SMSCampaignsApi.md#updatesmscampaign) | **Put** /smsCampaigns/{campaignId} | Update an SMS campaign -*SMSCampaignsApi* | [**UpdateSmsCampaignStatus**](docs/SMSCampaignsApi.md#updatesmscampaignstatus) | **Put** /smsCampaigns/{campaignId}/status | Update a campaign's status +*SMSCampaignsApi* | [**UpdateSmsCampaignStatus**](docs/SMSCampaignsApi.md#updatesmscampaignstatus) | **Put** /smsCampaigns/{campaignId}/status | Update a campaign's status *SendersApi* | [**CreateSender**](docs/SendersApi.md#createsender) | **Post** /senders | Create a new sender *SendersApi* | [**DeleteSender**](docs/SendersApi.md#deletesender) | **Delete** /senders/{senderId} | Delete a sender *SendersApi* | [**GetIps**](docs/SendersApi.md#getips) | **Get** /senders/ips | Get all the dedicated IPs for your account @@ -153,17 +187,19 @@ Class | Method | HTTP request | Description *TransactionalEmailsApi* | [**CreateSmtpTemplate**](docs/TransactionalEmailsApi.md#createsmtptemplate) | **Post** /smtp/templates | Create an email template *TransactionalEmailsApi* | [**DeleteBlockedDomain**](docs/TransactionalEmailsApi.md#deleteblockeddomain) | **Delete** /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains *TransactionalEmailsApi* | [**DeleteHardbounces**](docs/TransactionalEmailsApi.md#deletehardbounces) | **Post** /smtp/deleteHardbounces | Delete hardbounces +*TransactionalEmailsApi* | [**DeleteScheduledEmailById**](docs/TransactionalEmailsApi.md#deletescheduledemailbyid) | **Delete** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId *TransactionalEmailsApi* | [**DeleteSmtpTemplate**](docs/TransactionalEmailsApi.md#deletesmtptemplate) | **Delete** /smtp/templates/{templateId} | Delete an inactive email template *TransactionalEmailsApi* | [**GetAggregatedSmtpReport**](docs/TransactionalEmailsApi.md#getaggregatedsmtpreport) | **Get** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time *TransactionalEmailsApi* | [**GetBlockedDomains**](docs/TransactionalEmailsApi.md#getblockeddomains) | **Get** /smtp/blockedDomains | Get the list of blocked domains *TransactionalEmailsApi* | [**GetEmailEventReport**](docs/TransactionalEmailsApi.md#getemaileventreport) | **Get** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +*TransactionalEmailsApi* | [**GetScheduledEmailByBatchId**](docs/TransactionalEmailsApi.md#getscheduledemailbybatchid) | **Get** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +*TransactionalEmailsApi* | [**GetScheduledEmailByMessageId**](docs/TransactionalEmailsApi.md#getscheduledemailbymessageid) | **Get** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId *TransactionalEmailsApi* | [**GetSmtpReport**](docs/TransactionalEmailsApi.md#getsmtpreport) | **Get** /smtp/statistics/reports | Get your transactional email activity aggregated per day *TransactionalEmailsApi* | [**GetSmtpTemplate**](docs/TransactionalEmailsApi.md#getsmtptemplate) | **Get** /smtp/templates/{templateId} | Returns the template information *TransactionalEmailsApi* | [**GetSmtpTemplates**](docs/TransactionalEmailsApi.md#getsmtptemplates) | **Get** /smtp/templates | Get the list of email templates *TransactionalEmailsApi* | [**GetTransacBlockedContacts**](docs/TransactionalEmailsApi.md#gettransacblockedcontacts) | **Get** /smtp/blockedContacts | Get the list of blocked or unsubscribed transactional contacts *TransactionalEmailsApi* | [**GetTransacEmailContent**](docs/TransactionalEmailsApi.md#gettransacemailcontent) | **Get** /smtp/emails/{uuid} | Get the personalized content of a sent transactional email *TransactionalEmailsApi* | [**GetTransacEmailsList**](docs/TransactionalEmailsApi.md#gettransacemailslist) | **Get** /smtp/emails | Get the list of transactional emails on the basis of allowed filters -*TransactionalEmailsApi* | [**SendTemplate**](docs/TransactionalEmailsApi.md#sendtemplate) | **Post** /smtp/templates/{templateId}/send | Send a template *TransactionalEmailsApi* | [**SendTestTemplate**](docs/TransactionalEmailsApi.md#sendtesttemplate) | **Post** /smtp/templates/{templateId}/sendTest | Send a template to your test list *TransactionalEmailsApi* | [**SendTransacEmail**](docs/TransactionalEmailsApi.md#sendtransacemail) | **Post** /smtp/email | Send a transactional email *TransactionalEmailsApi* | [**SmtpBlockedContactsEmailDelete**](docs/TransactionalEmailsApi.md#smtpblockedcontactsemaildelete) | **Delete** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact @@ -179,27 +215,30 @@ Class | Method | HTTP request | Description *WebhooksApi* | [**GetWebhooks**](docs/WebhooksApi.md#getwebhooks) | **Get** /webhooks | Get all webhooks *WebhooksApi* | [**UpdateWebhook**](docs/WebhooksApi.md#updatewebhook) | **Put** /webhooks/{webhookId} | Update a webhook + ## Documentation For Models - [AbTestCampaignResult](docs/AbTestCampaignResult.md) - [AbTestCampaignResultClickedLinks](docs/AbTestCampaignResultClickedLinks.md) - [AbTestCampaignResultStatistics](docs/AbTestCampaignResultStatistics.md) + - [AbTestVersionClicks](docs/AbTestVersionClicks.md) - [AbTestVersionClicksInner](docs/AbTestVersionClicksInner.md) - [AbTestVersionStats](docs/AbTestVersionStats.md) - [AddChildDomain](docs/AddChildDomain.md) - [AddContactToList](docs/AddContactToList.md) - [AddCredits](docs/AddCredits.md) - - [AllOfgetChildrenListChildrenItems](docs/AllOfgetChildrenListChildrenItems.md) - - [AllOfgetContactsContactsItems](docs/AllOfgetContactsContactsItems.md) - - [AllOfgetEmailCampaignsCampaignsItems](docs/AllOfgetEmailCampaignsCampaignsItems.md) - - [AllOfgetExtendedCampaignStatsCampaignStatsItems](docs/AllOfgetExtendedCampaignStatsCampaignStatsItems.md) - - [AllOfgetExtendedCampaignStatsGlobalStats](docs/AllOfgetExtendedCampaignStatsGlobalStats.md) - - [AllOfgetFolderListsListsItems](docs/AllOfgetFolderListsListsItems.md) - - [AllOfgetFoldersFoldersItems](docs/AllOfgetFoldersFoldersItems.md) - - [AllOfgetListsListsItems](docs/AllOfgetListsListsItems.md) - - [AllOfgetSmsCampaignsCampaignsItems](docs/AllOfgetSmsCampaignsCampaignsItems.md) - - [AllOfgetWebhooksWebhooksItems](docs/AllOfgetWebhooksWebhooksItems.md) - [BlockDomain](docs/BlockDomain.md) + - [Body](docs/Body.md) + - [Body1](docs/Body1.md) + - [Body2](docs/Body2.md) + - [Body3](docs/Body3.md) + - [Body4](docs/Body4.md) + - [Body5](docs/Body5.md) + - [Body6](docs/Body6.md) + - [CompaniesList](docs/CompaniesList.md) + - [Company](docs/Company.md) + - [CompanyAttributes](docs/CompanyAttributes.md) + - [CompanyAttributesInner](docs/CompanyAttributesInner.md) - [CreateAttribute](docs/CreateAttribute.md) - [CreateAttributeEnumeration](docs/CreateAttributeEnumeration.md) - [CreateChild](docs/CreateChild.md) @@ -219,14 +258,19 @@ Class | Method | HTTP request | Description - [CreateSmtpEmail](docs/CreateSmtpEmail.md) - [CreateSmtpTemplate](docs/CreateSmtpTemplate.md) - [CreateSmtpTemplateSender](docs/CreateSmtpTemplateSender.md) + - [CreateSubAccount](docs/CreateSubAccount.md) + - [CreateSubAccountResponse](docs/CreateSubAccountResponse.md) - [CreateUpdateContactModel](docs/CreateUpdateContactModel.md) - [CreateUpdateFolder](docs/CreateUpdateFolder.md) - [CreateWebhook](docs/CreateWebhook.md) - [CreatedProcessId](docs/CreatedProcessId.md) + - [Deal](docs/Deal.md) + - [DealAttributes](docs/DealAttributes.md) + - [DealAttributesInner](docs/DealAttributesInner.md) + - [DealsList](docs/DealsList.md) - [DeleteHardbounces](docs/DeleteHardbounces.md) - [EmailExportRecipients](docs/EmailExportRecipients.md) - [ErrorModel](docs/ErrorModel.md) - - [GetAccount](docs/GetAccount.md) - [GetAccountMarketingAutomation](docs/GetAccountMarketingAutomation.md) - [GetAccountPlan](docs/GetAccountPlan.md) - [GetAccountRelay](docs/GetAccountRelay.md) @@ -241,7 +285,7 @@ Class | Method | HTTP request | Description - [GetCampaignStats](docs/GetCampaignStats.md) - [GetChildAccountCreationStatus](docs/GetChildAccountCreationStatus.md) - [GetChildDomain](docs/GetChildDomain.md) - - [GetChildInfo](docs/GetChildInfo.md) + - [GetChildDomains](docs/GetChildDomains.md) - [GetChildInfoApiKeys](docs/GetChildInfoApiKeys.md) - [GetChildInfoApiKeysV2](docs/GetChildInfoApiKeysV2.md) - [GetChildInfoApiKeysV3](docs/GetChildInfoApiKeysV3.md) @@ -257,29 +301,30 @@ Class | Method | HTTP request | Description - [GetContactDetails](docs/GetContactDetails.md) - [GetContacts](docs/GetContacts.md) - [GetDeviceBrowserStats](docs/GetDeviceBrowserStats.md) - - [GetEmailCampaign](docs/GetEmailCampaign.md) - [GetEmailCampaigns](docs/GetEmailCampaigns.md) - [GetEmailEventReport](docs/GetEmailEventReport.md) - [GetEmailEventReportEvents](docs/GetEmailEventReportEvents.md) - - [GetExtendedCampaignOverview](docs/GetExtendedCampaignOverview.md) - [GetExtendedCampaignOverviewSender](docs/GetExtendedCampaignOverviewSender.md) - [GetExtendedCampaignStats](docs/GetExtendedCampaignStats.md) - - [GetExtendedClient](docs/GetExtendedClient.md) - [GetExtendedClientAddress](docs/GetExtendedClientAddress.md) - - [GetExtendedContactDetails](docs/GetExtendedContactDetails.md) - [GetExtendedContactDetailsStatistics](docs/GetExtendedContactDetailsStatistics.md) - [GetExtendedContactDetailsStatisticsClicked](docs/GetExtendedContactDetailsStatisticsClicked.md) + - [GetExtendedContactDetailsStatisticsDelivered](docs/GetExtendedContactDetailsStatisticsDelivered.md) - [GetExtendedContactDetailsStatisticsLinks](docs/GetExtendedContactDetailsStatisticsLinks.md) - [GetExtendedContactDetailsStatisticsMessagesSent](docs/GetExtendedContactDetailsStatisticsMessagesSent.md) - [GetExtendedContactDetailsStatisticsOpened](docs/GetExtendedContactDetailsStatisticsOpened.md) - [GetExtendedContactDetailsStatisticsUnsubscriptions](docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md) - [GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription](docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md) - [GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription](docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md) - - [GetExtendedList](docs/GetExtendedList.md) - [GetExtendedListCampaignStats](docs/GetExtendedListCampaignStats.md) - [GetFolder](docs/GetFolder.md) - [GetFolderLists](docs/GetFolderLists.md) - [GetFolders](docs/GetFolders.md) + - [GetInboundEmailEvents](docs/GetInboundEmailEvents.md) + - [GetInboundEmailEventsByUuid](docs/GetInboundEmailEventsByUuid.md) + - [GetInboundEmailEventsByUuidAttachments](docs/GetInboundEmailEventsByUuidAttachments.md) + - [GetInboundEmailEventsByUuidLogs](docs/GetInboundEmailEventsByUuidLogs.md) + - [GetInboundEmailEventsEvents](docs/GetInboundEmailEventsEvents.md) - [GetIp](docs/GetIp.md) - [GetIpFromSender](docs/GetIpFromSender.md) - [GetIps](docs/GetIps.md) @@ -290,11 +335,13 @@ Class | Method | HTTP request | Description - [GetProcesses](docs/GetProcesses.md) - [GetReports](docs/GetReports.md) - [GetReportsReports](docs/GetReportsReports.md) + - [GetScheduledEmailByBatchId](docs/GetScheduledEmailByBatchId.md) + - [GetScheduledEmailByBatchIdBatches](docs/GetScheduledEmailByBatchIdBatches.md) + - [GetScheduledEmailByMessageId](docs/GetScheduledEmailByMessageId.md) - [GetSendersList](docs/GetSendersList.md) - [GetSendersListIps](docs/GetSendersListIps.md) - [GetSendersListSenders](docs/GetSendersListSenders.md) - [GetSharedTemplateUrl](docs/GetSharedTemplateUrl.md) - - [GetSmsCampaign](docs/GetSmsCampaign.md) - [GetSmsCampaignOverview](docs/GetSmsCampaignOverview.md) - [GetSmsCampaignStats](docs/GetSmsCampaignStats.md) - [GetSmsCampaigns](docs/GetSmsCampaigns.md) @@ -304,7 +351,9 @@ Class | Method | HTTP request | Description - [GetSmtpTemplateOverviewSender](docs/GetSmtpTemplateOverviewSender.md) - [GetSmtpTemplates](docs/GetSmtpTemplates.md) - [GetSsoToken](docs/GetSsoToken.md) + - [GetStatsByBrowser](docs/GetStatsByBrowser.md) - [GetStatsByDevice](docs/GetStatsByDevice.md) + - [GetStatsByDomain](docs/GetStatsByDomain.md) - [GetTransacAggregatedSmsReport](docs/GetTransacAggregatedSmsReport.md) - [GetTransacBlockedContacts](docs/GetTransacBlockedContacts.md) - [GetTransacBlockedContactsContacts](docs/GetTransacBlockedContactsContacts.md) @@ -317,7 +366,22 @@ Class | Method | HTTP request | Description - [GetTransacSmsReportReports](docs/GetTransacSmsReportReports.md) - [GetWebhook](docs/GetWebhook.md) - [GetWebhooks](docs/GetWebhooks.md) + - [InlineResponse200](docs/InlineResponse200.md) + - [InlineResponse201](docs/InlineResponse201.md) + - [InlineResponse2011](docs/InlineResponse2011.md) - [ManageIp](docs/ManageIp.md) + - [MasterDetailsResponse](docs/MasterDetailsResponse.md) + - [MasterDetailsResponseBillingInfo](docs/MasterDetailsResponseBillingInfo.md) + - [MasterDetailsResponseBillingInfoAddress](docs/MasterDetailsResponseBillingInfoAddress.md) + - [MasterDetailsResponseBillingInfoName](docs/MasterDetailsResponseBillingInfoName.md) + - [MasterDetailsResponsePlanInfo](docs/MasterDetailsResponsePlanInfo.md) + - [MasterDetailsResponsePlanInfoFeatures](docs/MasterDetailsResponsePlanInfoFeatures.md) + - [Note](docs/Note.md) + - [NoteData](docs/NoteData.md) + - [NoteId](docs/NoteId.md) + - [NoteList](docs/NoteList.md) + - [Pipeline](docs/Pipeline.md) + - [PipelineStage](docs/PipelineStage.md) - [PostContactInfo](docs/PostContactInfo.md) - [PostContactInfoContacts](docs/PostContactInfoContacts.md) - [PostSendFailed](docs/PostSendFailed.md) @@ -332,8 +396,7 @@ Class | Method | HTTP request | Description - [RequestContactImport](docs/RequestContactImport.md) - [RequestContactImportNewList](docs/RequestContactImportNewList.md) - [RequestSmsRecipientExport](docs/RequestSmsRecipientExport.md) - - [SendEmail](docs/SendEmail.md) - - [SendEmailAttachment](docs/SendEmailAttachment.md) + - [ScheduleSmtpEmail](docs/ScheduleSmtpEmail.md) - [SendReport](docs/SendReport.md) - [SendReportEmail](docs/SendReportEmail.md) - [SendSms](docs/SendSms.md) @@ -347,12 +410,32 @@ Class | Method | HTTP request | Description - [SendSmtpEmailSender](docs/SendSmtpEmailSender.md) - [SendSmtpEmailTo](docs/SendSmtpEmailTo.md) - [SendSmtpEmailTo1](docs/SendSmtpEmailTo1.md) - - [SendTemplateEmail](docs/SendTemplateEmail.md) - [SendTestEmail](docs/SendTestEmail.md) - [SendTestSms](docs/SendTestSms.md) - [SendTransacSms](docs/SendTransacSms.md) + - [SsoTokenRequest](docs/SsoTokenRequest.md) + - [SubAccountDetailsResponse](docs/SubAccountDetailsResponse.md) + - [SubAccountDetailsResponsePlanInfo](docs/SubAccountDetailsResponsePlanInfo.md) + - [SubAccountDetailsResponsePlanInfoCredits](docs/SubAccountDetailsResponsePlanInfoCredits.md) + - [SubAccountDetailsResponsePlanInfoCreditsEmails](docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md) + - [SubAccountDetailsResponsePlanInfoFeatures](docs/SubAccountDetailsResponsePlanInfoFeatures.md) + - [SubAccountDetailsResponsePlanInfoFeaturesInbox](docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md) + - [SubAccountDetailsResponsePlanInfoFeaturesLandingPage](docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md) + - [SubAccountDetailsResponsePlanInfoFeaturesUsers](docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md) + - [SubAccountUpdatePlanRequest](docs/SubAccountUpdatePlanRequest.md) + - [SubAccountUpdatePlanRequestCredits](docs/SubAccountUpdatePlanRequestCredits.md) + - [SubAccountUpdatePlanRequestFeatures](docs/SubAccountUpdatePlanRequestFeatures.md) + - [SubAccountsResponse](docs/SubAccountsResponse.md) + - [SubAccountsResponseSubAccounts](docs/SubAccountsResponseSubAccounts.md) + - [Task](docs/Task.md) + - [TaskList](docs/TaskList.md) + - [TaskReminder](docs/TaskReminder.md) + - [TaskTypes](docs/TaskTypes.md) - [UpdateAttribute](docs/UpdateAttribute.md) - [UpdateAttributeEnumeration](docs/UpdateAttributeEnumeration.md) + - [UpdateBatchContacts](docs/UpdateBatchContacts.md) + - [UpdateBatchContactsContacts](docs/UpdateBatchContactsContacts.md) + - [UpdateBatchContactsModel](docs/UpdateBatchContactsModel.md) - [UpdateCampaignStatus](docs/UpdateCampaignStatus.md) - [UpdateChild](docs/UpdateChild.md) - [UpdateChildAccountStatus](docs/UpdateChildAccountStatus.md) @@ -368,6 +451,15 @@ Class | Method | HTTP request | Description - [UpdateSmtpTemplateSender](docs/UpdateSmtpTemplateSender.md) - [UpdateWebhook](docs/UpdateWebhook.md) - [UploadImageToGallery](docs/UploadImageToGallery.md) + - [GetChildInfo](docs/GetChildInfo.md) + - [GetExtendedCampaignOverview](docs/GetExtendedCampaignOverview.md) + - [GetExtendedClient](docs/GetExtendedClient.md) + - [GetExtendedContactDetails](docs/GetExtendedContactDetails.md) + - [GetExtendedList](docs/GetExtendedList.md) + - [GetSmsCampaign](docs/GetSmsCampaign.md) + - [GetAccount](docs/GetAccount.md) + - [GetEmailCampaign](docs/GetEmailCampaign.md) + ## Documentation For Authorization @@ -395,3 +487,4 @@ As always, if you need additional assistance, drop us a note [here](https://acco ## Author contact@sendinblue.com + diff --git a/api/swagger.yaml b/api/swagger.yaml new file mode 100644 index 0000000..a667194 --- /dev/null +++ b/api/swagger.yaml @@ -0,0 +1,12795 @@ +--- +swagger: "2.0" +info: + description: "SendinBlue provide a RESTFul API that can be used with any languages.\ + \ With this API, you will be able to :\n - Manage your campaigns and get the\ + \ statistics\n - Manage your contacts\n - Send transactional Emails and SMS\n\ + \ - and much more...\n\nYou can download our wrappers at https://github.com/orgs/sendinblue\n\ + \n**Possible responses**\n | Code | Message |\n | :-------------: | -------------\ + \ |\n | 200 | OK. Successful Request |\n | 201 | OK. Successful Creation\ + \ |\n | 202 | OK. Request accepted |\n | 204 | OK. Successful Update/Deletion\ + \ |\n | 400 | Error. Bad Request |\n | 401 | Error. Authentication Needed\ + \ |\n | 402 | Error. Not enough credit, plan upgrade needed |\n | 403 |\ + \ Error. Permission denied |\n | 404 | Error. Object does not exist |\n |\ + \ 405 | Error. Method not allowed |\n | 406 | Error. Not Acceptable |\n" + version: "3.0.0" + title: "SendinBlue API" + contact: + name: "Sendinblue Support" + url: "https://account.sendinblue.com/support" + email: "contact@sendinblue.com" + license: + name: "MIT" + url: "http://opensource.org/licenses/MIT" +host: "api.sendinblue.com" +basePath: "/v3" +schemes: +- "https" +consumes: +- "application/json" +produces: +- "application/json" +security: +- api-key: [] +- partner-key: [] +paths: + /emailCampaigns: + get: + tags: + - "Email Campaigns" + summary: "Return all your created email campaigns" + operationId: "getEmailCampaigns" + parameters: + - name: "type" + in: "query" + description: "Filter on the type of the campaigns" + required: false + type: "string" + enum: + - "classic" + - "trigger" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "status" + in: "query" + description: "Filter on the status of the campaign" + required: false + type: "string" + enum: + - "suspended" + - "archive" + - "sent" + - "queued" + - "draft" + - "inProcess" + x-exportParamName: "Status" + x-optionalDataType: "String" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting (urlencoded) UTC date-time\ + \ (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer\ + \ to pass your timezone in date-time format for accurate result ( only available\ + \ if either 'status' not passed and if passed is set to 'sent' )" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending (urlencoded) UTC date-time\ + \ (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer\ + \ to pass your timezone in date-time format for accurate result ( only available\ + \ if either 'status' not passed and if passed is set to 'sent' )" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + maximum: 100 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document in the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Email campaigns informations" + examples: + applications/json: + campaigns: + - id: 12 + name: "EN - Sales Summer 2017" + subject: "20% OFF for 2017 Summer Sales" + type: "classic" + status: "sent" + scheduledAt: "2017-06-01T12:30:00Z" + testSent: true + header: "[DEFAULT_HEADER]" + footer: "[DEFAULT_FOOTER]" + sender: + email: "marketing@mycompany.com" + name: "Marketing" + id: 26 + replyTo: "replyto@domain.com" + toField: "{FNAME} {LNAME}" + htmlContent: "This is my HTML Content" + shareLink: "http://example.com/fhsgccc.html?t=9865448900" + tag: "Newsletter" + createdAt: "2017-05-01T12:30:00Z" + modifiedAt: "2017-05-01T12:30:00Z" + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 5 + exclusionLists: + - 13 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 5 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: 80 + statsByDomain: + yahoo: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + - id: 22 + name: "Weekly - 1" + subject: "Week 1 - Newsletter" + type: "Classic" + status: "draft" + scheduledAt: "" + testSent: false + header: "[DEFAULT_HEADER]" + footer: "[DEFAULT_FOOTER]" + sender: + email: "newsletter@mycompany.com" + name: "Newsletter" + id: 26 + replyTo: "replyto@domain.com" + toField: "{FNAME} {LNAME}" + htmlContent: "This is my HTML Content" + shareLink: "http://example.com/fhsgccc.html?t=9865448900" + tag: "Newsletter" + createdAt: "2017-05-01T12:30:00Z" + modifiedAt: "2017-05-01T12:30:00Z" + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 10 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 10 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + yahoo.com: + uniqueClicks: 298 + clickers: 533 + complaints: 0 + sent: 25601 + softBounces: 5 + hardBounces: 0 + uniqueViews: 3527 + unsubscriptions: 17 + viewed: 5255 + delivered: 25596 + hotmail.co.uk: + uniqueClicks: 1970 + clickers: 2720 + complaints: 5 + sent: 117055 + softBounces: 111 + hardBounces: 0 + uniqueViews: 21111 + unsubscriptions: 105 + viewed: 35251 + delivered: 117056 + count: 2 + schema: + $ref: "#/definitions/getEmailCampaigns" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Email Campaigns" + summary: "Create an email campaign" + operationId: "createEmailCampaign" + parameters: + - in: "body" + name: "emailCampaigns" + description: "Values to create a campaign" + required: true + schema: + $ref: "#/definitions/createEmailCampaign" + x-exportParamName: "EmailCampaigns" + responses: + "201": + description: "Email campaign created" + schema: + $ref: "#/definitions/createModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}: + get: + tags: + - "Email Campaigns" + summary: "Get an email campaign report" + operationId: "getEmailCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "200": + description: "Email campaign informations" + examples: + application/json: + id: 22 + name: "Weekly - 1" + subject: "Week 1 - Newsletter" + type: "classic" + status: "draft" + scheduledAt: "2017-09-22T12:30:00Z" + testSent: false + header: "[DEFAULT_HEADER]" + footer: "[DEFAULT_FOOTER]" + sender: + email: "newsletter@mycompany.com" + name: "Newsletter" + id: 26 + replyTo: "replyto@domain.com" + toField: "{FNAME} {LNAME}" + htmlContent: "This is my HTML Content" + shareLink: "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900" + tag: "Newsletter" + createdAt: "2017-05-01T12:30:00Z" + modifiedAt: "2017-05-01T12:30:00Z" + inlineImageActivation: true + mirrorActive: true + recurring: false + recipients: + lists: + - 22 + exclusionLists: + - 45 + statistics: + globalStats: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + trackableViewsRate: 23.45 + estimatedViews: 560 + unsubscriptions: 2 + viewed: 8999 + campaignStats: + - listId: 22 + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + trackableViews: 5661 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + mirrorClick: 120 + remaining: 1000 + linksStats: + http://myUrl1.domain.com: + nbClick: 80 + http://myUrl2.domain.com: + nbClick: 80 + http://myUrl3.domain.com: + nbClick: 80 + statsByDomain: + gmail: + uniqueClicks: 2300 + clickers: 2665 + complaints: 1 + delivered: 19765 + sent: 19887 + softBounces: 100 + hardBounces: 87 + uniqueViews: 7779 + unsubscriptions: 2 + viewed: 8999 + deferred: 30 + statsByDevice: + desktop: + mac: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 1 + mobile: + androidMobile: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + iPhone: + clickers: 1 + uniqueClicks: 0 + viewed: 2 + uniqueViews: 0 + statsByBrowser: + thunderbird: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + safari: + clickers: 1 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + internetExplorer: + clickers: 0 + uniqueClicks: 0 + viewed: 1 + uniqueViews: 0 + schema: + $ref: "#/definitions/getEmailCampaign" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Email Campaigns" + summary: "Update an email campaign" + operationId: "updateEmailCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "emailCampaign" + description: "Values to update a campaign" + required: true + schema: + $ref: "#/definitions/updateEmailCampaign" + x-exportParamName: "EmailCampaign" + responses: + "204": + description: "Email Campaign has been updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Email Campaigns" + summary: "Delete an email campaign" + operationId: "deleteEmailCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "204": + description: "Email campaign has been deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/sendNow: + post: + tags: + - "Email Campaigns" + summary: "Send an email campaign immediately, based on campaignId" + operationId: "sendEmailCampaignNow" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "204": + description: "Email campaign has been scheduled" + "400": + description: "Campaign could not be sent" + schema: + $ref: "#/definitions/errorModel" + "402": + description: "You don't have enough credit to send your campaign. Please\ + \ update your plan" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/sendTest: + post: + tags: + - "Email Campaigns" + summary: "Send an email campaign to your test list" + operationId: "sendTestEmail" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "emailTo" + required: true + schema: + $ref: "#/definitions/sendTestEmail" + x-exportParamName: "EmailTo" + responses: + "204": + description: "Test email has been sent successfully to all recipients" + "400": + description: "Test email could not be sent to the following email addresses" + schema: + $ref: "#/definitions/postSendFailed" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/status: + put: + tags: + - "Email Campaigns" + summary: "Update an email campaign status" + operationId: "updateCampaignStatus" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "status" + description: "Status of the campaign" + required: true + schema: + $ref: "#/definitions/updateCampaignStatus" + x-exportParamName: "Status" + responses: + "204": + description: "The campaign status has been updated successfully" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/sendReport: + post: + tags: + - "Email Campaigns" + summary: "Send the report of a campaign" + description: "A PDF will be sent to the specified email addresses" + operationId: "sendReport" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "sendReport" + description: "Values for send a report" + required: true + schema: + $ref: "#/definitions/sendReport" + x-exportParamName: "SendReport" + responses: + "204": + description: "Report has been successfully sent to the defined recipients" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/abTestCampaignResult: + get: + tags: + - "Email Campaigns" + summary: "Get an A/B test email campaign results" + description: "Obtain winning version of an A/B test email campaign" + operationId: "getAbTestCampaignResult" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the A/B test campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "200": + description: "A/B test email campaign Result" + examples: + application/json: + winningVersion: "B" + winningCriteria: "Click" + openRate: "100%" + clickRate: "50%" + winningVersionRate: "0%" + statistics: + openers: + Version A: "20%" + Version B: "100%" + clicks: + Version A: "0%" + Version B: "50%" + unsubscribed: + Version A: "20%" + Version B: "0%" + softBounces: + Version A: "0%" + Version B: "0%" + hardBounces: + Version A: "0%" + Version B: "0%" + complaints: + Version A: "0%" + Version B: "0%" + clickedLinks: + Version A: + - link: "http://www.google.com" + clicksCount: 0 + clickRate: "0%" + - link: "http://www.youtube.com" + clicksCount: 0 + clickRate: "0%" + Version B: + - link: "http://www.github.com" + clicksCount: 2 + clickRate: "40%" + - link: "http://www.stackoverflow.com" + clicksCount: 3 + clickRate: "60%" + schema: + $ref: "#/definitions/abTestCampaignResult" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "A/B test Email Campaign not found" + schema: + $ref: "#/definitions/errorModel" + "405": + description: "Only email campaigns or templates are allowed" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/sharedUrl: + get: + tags: + - "Email Campaigns" + summary: "Get a shared template url" + description: "Get a unique URL to share & import an email template from one\ + \ Sendinblue account to another." + operationId: "getSharedTemplateUrl" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign or template" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "200": + description: "Shared template URL information" + examples: + application/json: + sharedUrl: "https://my.sendinblue.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-" + schema: + $ref: "#/definitions/getSharedTemplateUrl" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign/Template ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/{campaignId}/exportRecipients: + post: + tags: + - "Email Campaigns" + summary: "Export the recipients of an email campaign" + operationId: "emailExportRecipients" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "recipientExport" + description: "Values to send for a recipient export request" + required: false + schema: + $ref: "#/definitions/emailExportRecipients" + x-exportParamName: "RecipientExport" + responses: + "202": + description: "Recipient export request has been accepted" + schema: + $ref: "#/definitions/createdProcessId" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /emailCampaigns/images: + post: + tags: + - "Email Campaigns" + summary: "Upload an image to your account's image gallery" + operationId: "uploadImageToGallery" + parameters: + - in: "body" + name: "uploadImage" + description: "Parameters to upload an image" + required: true + schema: + $ref: "#/definitions/uploadImageToGallery" + x-exportParamName: "UploadImage" + responses: + "201": + description: "Image successfully uploaded" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/email: + post: + tags: + - "Transactional emails" + summary: "Send a transactional email" + operationId: "sendTransacEmail" + parameters: + - in: "body" + name: "sendSmtpEmail" + description: "Values to send a transactional email" + required: true + schema: + $ref: "#/definitions/sendSmtpEmail" + x-exportParamName: "SendSmtpEmail" + responses: + "201": + description: "transactional email sent" + schema: + $ref: "#/definitions/createSmtpEmail" + "202": + description: "transactional email scheduled" + schema: + $ref: "#/definitions/scheduleSmtpEmail" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/emails: + get: + tags: + - "Transactional emails" + summary: "Get the list of transactional emails on the basis of allowed filters" + description: "This endpoint will show the list of emails for past 30 days by\ + \ default. To retrieve emails before that time, please pass startDate and\ + \ endDate in query filters." + operationId: "getTransacEmailsList" + parameters: + - name: "email" + in: "query" + description: "Mandatory if templateId and messageId are not passed in query\ + \ filters. Email address to which transactional email has been sent." + required: false + type: "string" + x-exportParamName: "Email" + x-optionalDataType: "String" + - name: "templateId" + in: "query" + description: "Mandatory if email and messageId are not passed in query filters.\ + \ Id of the template that was used to compose transactional email." + required: false + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + x-optionalDataType: "Int64" + - name: "messageId" + in: "query" + description: "Mandatory if templateId and email are not passed in query filters.\ + \ Message ID of the transactional email sent." + required: false + type: "string" + x-exportParamName: "MessageId" + x-optionalDataType: "String" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) from\ + \ which you want to fetch the list. Maximum time period that can be selected\ + \ is one month." + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) till\ + \ which you want to fetch the list. Maximum time period that can be selected\ + \ is one month." + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 500 + maximum: 1000 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document in the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + responses: + "200": + description: "List of transactional emails" + examples: + application/json: + count: 120 + transactionalEmails: + - email: "abc@xyz.com" + subject: "summer camp" + templateId: 15 + messageId: "<201798300811.5787683@relay.domain.com>" + uuid: "5a78c-209ok98262910-std2341" + date: "2019-05-25T11:53:26Z" + - email: "test@test.com" + subject: "details verification" + templateId: 15 + messageId: "<201798300811.5700093@relay.domain.com>" + uuid: "5a78c-209ok98262910-s99a341" + date: "2019-05-25T07:28:11Z" + schema: + $ref: "#/definitions/getTransacEmailsList" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/emails/{uuid}: + get: + tags: + - "Transactional emails" + summary: "Get the personalized content of a sent transactional email" + operationId: "getTransacEmailContent" + parameters: + - name: "uuid" + in: "path" + description: "Unique id of the transactional email that has been sent to a\ + \ particular contact" + required: true + type: "string" + x-exportParamName: "Uuid" + responses: + "200": + description: "Transactional email content" + examples: + application/json: + email: "abc@example.com" + subject: "Summer Camps" + templateId: 12 + date: "2016-02-25T11:53:26Z" + events: + - name: "sent" + time: "2016-02-25T11:53:26Z" + - name: "delivered" + time: "2016-02-25T11:55:26Z" + - name: "opened" + time: "2016-02-26T09:53:26Z" + body: "

Greetings from the team

\ + \

This is the actual html content sent

" + schema: + $ref: "#/definitions/getTransacEmailContent" + /smtp/log/{messageId}: + delete: + tags: + - "Transactional emails" + summary: "Delete an SMTP transactional log" + parameters: + - name: "messageId" + in: "path" + description: "MessageId of the transactional log to delete" + required: true + type: "string" + x-exportParamName: "MessageId" + responses: + "204": + description: "Transactional Logs deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Message ID not found" + schema: + $ref: "#/definitions/errorModel" + /smtp/templates: + get: + tags: + - "Transactional emails" + summary: "Get the list of email templates" + operationId: "getSmtpTemplates" + parameters: + - name: "templateStatus" + in: "query" + description: "Filter on the status of the template. Active = true, inactive\ + \ = false" + required: false + type: "boolean" + x-exportParamName: "TemplateStatus" + x-optionalDataType: "Bool" + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 50 + maximum: 1000 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document in the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "transactional email templates informations" + examples: + application/json: + count: 2 + templates: + - id: 5 + name: "ChristomasTimeTemplate" + subject: "Merry Christmas" + isActive: false + testSent: false + sender: + name: "John" + email: "john.smith@example.com" + id: 23 + replyTo: "replyto@domain.com" + toField: "" + tag: "Festival" + htmlContent: "HTML CONTENT 1" + createdAt: "2016-02-24T14:44:24Z" + modifiedAt: "2016-02-24T15:37:11Z" + - id: 12 + name: "SummerSales2017Template" + subject: "Enjoy our summer Sales !" + isActive: true + testSent: false + sender: + name: "John" + email: "john.smith@example.com" + id: 23 + replyTo: "replyto@domain.com" + toField: "" + tag: "Summer" + htmlContent: "HTML CONTENT 2" + createdAt: "2016-02-25T11:53:26Z" + modifiedAt: "2016-02-25T11:53:26Z" + schema: + $ref: "#/definitions/getSmtpTemplates" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Transactional emails" + summary: "Create an email template" + operationId: "createSmtpTemplate" + parameters: + - in: "body" + name: "smtpTemplate" + description: "values to update in transactional email template" + required: true + schema: + $ref: "#/definitions/createSmtpTemplate" + x-exportParamName: "SmtpTemplate" + responses: + "201": + description: "transactional email template created" + schema: + $ref: "#/definitions/createModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/templates/{templateId}: + get: + tags: + - "Transactional emails" + summary: "Returns the template information" + operationId: "getSmtpTemplate" + parameters: + - name: "templateId" + in: "path" + description: "id of the template" + required: true + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + responses: + "200": + description: "Email template informations" + examples: + application/json: + id: 33 + name: "OrderConfirmation" + subject: "Order Confirmation : Thanks for your Purchase !" + isActive: true + testSent: false + sender: + name: "John" + email: "john.smith@example.com" + id: 26 + replyTo: "replyto@domain.com" + toField: "" + tag: "" + htmlContent: "HTML CONTENT 4" + createdAt: "2016-02-25T11:53:26Z" + modifiedAt: "2016-02-25T11:53:26Z" + doiTemplate: false + schema: + $ref: "#/definitions/getSmtpTemplateOverview" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Template ID not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Transactional emails" + summary: "Update an email template" + operationId: "updateSmtpTemplate" + parameters: + - name: "templateId" + in: "path" + description: "id of the template" + required: true + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + - in: "body" + name: "smtpTemplate" + description: "values to update in transactional email template" + required: true + schema: + $ref: "#/definitions/updateSmtpTemplate" + x-exportParamName: "SmtpTemplate" + responses: + "204": + description: "transactional email template updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Template ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Transactional emails" + summary: "Delete an inactive email template" + operationId: "deleteSmtpTemplate" + parameters: + - name: "templateId" + in: "path" + description: "id of the template" + required: true + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + responses: + "204": + description: "Inactive transactional email template has been deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Template ID not found" + schema: + $ref: "#/definitions/errorModel" + /smtp/templates/{templateId}/sendTest: + post: + tags: + - "Transactional emails" + summary: "Send a template to your test list" + operationId: "sendTestTemplate" + parameters: + - name: "templateId" + in: "path" + description: "Id of the template" + required: true + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + - in: "body" + name: "sendTestEmail" + required: true + schema: + $ref: "#/definitions/sendTestEmail" + x-exportParamName: "SendTestEmail" + responses: + "204": + description: "Test email has been sent successfully to all recipients" + "400": + description: "Test email could not be sent to the following email addresses" + schema: + $ref: "#/definitions/postSendFailed" + "404": + description: "Template ID not found" + schema: + $ref: "#/definitions/errorModel" + /smtp/statistics/aggregatedReport: + get: + tags: + - "Transactional emails" + summary: "Get your transactional email activity aggregated over a period of\ + \ time" + description: "This endpoint will show the aggregated stats for past 90 days\ + \ by default if `startDate` and `endDate` OR `days` is not passed. The date\ + \ range can not exceed 90 days" + operationId: "getAggregatedSmtpReport" + parameters: + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD).\ + \ Must be lower than equal to endDate" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD).\ + \ Must be greater than equal to startDate" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "days" + in: "query" + description: "Number of days in the past including today (positive integer).\ + \ Not compatible with 'startDate' and 'endDate'" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Days" + x-optionalDataType: "Int64" + - name: "tag" + in: "query" + description: "Tag of the emails" + required: false + type: "string" + x-exportParamName: "Tag" + x-optionalDataType: "String" + responses: + "200": + description: "Aggregated report informations" + examples: + application/json: + range: "2016-09-08|2017-04-28" + requests: 19887 + delivered: 18996 + hardBounces: 234 + softBounces: 1533 + clicks: 9987 + uniqueClicks: 8766 + opens: 17654 + uniqueOpens: 13688 + spamReports: 1 + blocked: 2 + invalid: 0 + unsubscribed: 2 + schema: + $ref: "#/definitions/getAggregatedReport" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/statistics/reports: + get: + tags: + - "Transactional emails" + summary: "Get your transactional email activity aggregated per day" + operationId: "getSmtpReport" + parameters: + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 10 + maximum: 30 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document on the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD)" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD)" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "days" + in: "query" + description: "Number of days in the past including today (positive integer).\ + \ Not compatible with 'startDate' and 'endDate'" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Days" + x-optionalDataType: "Int64" + - name: "tag" + in: "query" + description: "Tag of the emails" + required: false + type: "string" + x-exportParamName: "Tag" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Aggregated report informations" + examples: + application/json: + reports: + - date: "2017-04-30" + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + clicks: 1026 + uniqueClicks: 720 + opens: 5091 + uniqueOpens: 2318 + spamReports: 0 + blocked: 519 + invalid: 1 + unsubscribed: 0 + - date: "2017-05-01" + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + clicks: 1514 + uniqueClicks: 1090 + opens: 10089 + uniqueOpens: 4393 + spamReports: 0 + blocked: 920 + invalid: 2 + unsubscribed: 3 + schema: + $ref: "#/definitions/getReports" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/statistics/events: + get: + tags: + - "Transactional emails" + summary: "Get all your transactional email activity (unaggregated events)" + description: "This endpoint will show the aggregated stats for past 30 days\ + \ by default if `startDate` and `endDate` OR `days` is not passed. The date\ + \ range can not exceed 90 days" + operationId: "getEmailEventReport" + parameters: + - name: "limit" + in: "query" + description: "Number limitation for the result returned" + required: false + type: "integer" + default: 50 + maximum: 100 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Beginning point in the list to retrieve from." + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD).\ + \ Must be lower than equal to endDate" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD).\ + \ Must be greater than equal to startDate" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "days" + in: "query" + description: "Number of days in the past including today (positive integer).\ + \ Not compatible with 'startDate' and 'endDate'" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Days" + x-optionalDataType: "Int64" + - name: "email" + in: "query" + description: "Filter the report for a specific email addresses" + required: false + type: "string" + format: "email" + x-exportParamName: "Email" + x-optionalDataType: "String" + - name: "event" + in: "query" + description: "Filter the report for a specific event type" + required: false + type: "string" + enum: + - "bounces" + - "hardBounces" + - "softBounces" + - "delivered" + - "spam" + - "requests" + - "opened" + - "clicks" + - "invalid" + - "deferred" + - "blocked" + - "unsubscribed" + - "error" + - "loadedByProxy" + x-exportParamName: "Event" + x-optionalDataType: "String" + - name: "tags" + in: "query" + description: "Filter the report for tags (serialized and urlencoded array)" + required: false + type: "string" + x-exportParamName: "Tags" + x-optionalDataType: "String" + - name: "messageId" + in: "query" + description: "Filter on a specific message id" + required: false + type: "string" + x-exportParamName: "MessageId" + x-optionalDataType: "String" + - name: "templateId" + in: "query" + description: "Filter on a specific template id" + required: false + type: "integer" + format: "int64" + x-exportParamName: "TemplateId" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Email events report informations" + examples: + application/json: + events: + - email: "john.smith@example.com" + date: "2017-03-12T12:30:00Z" + messageId: "<201798300811.5787683@example.domain.com>" + event: "deferred" + reason: "Error connection timeout" + tag: "OrderConfirmation" + from: "john@example.com" + templateId: 4 + - email: "john.smith@example.com" + date: "2017-03-13T16:30:00Z" + messageId: "<201798300811.5787683@example.domain.com>" + event: "delivered" + tag: "OrderConfirmation" + from: "john@example.com" + templateId: 5 + schema: + $ref: "#/definitions/getEmailEventReport" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/blockedContacts/{email}: + delete: + tags: + - "Transactional emails" + summary: "Unblock or resubscribe a transactional contact" + parameters: + - name: "email" + in: "path" + description: "contact email (urlencoded) to unblock." + required: true + type: "string" + x-exportParamName: "Email" + responses: + "204": + description: "Contact unblocked" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Contact email not found" + schema: + $ref: "#/definitions/errorModel" + /smtp/blockedContacts: + get: + tags: + - "Transactional emails" + summary: "Get the list of blocked or unsubscribed transactional contacts" + operationId: "getTransacBlockedContacts" + parameters: + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) from\ + \ which you want to fetch the blocked or unsubscribed contacts" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) till\ + \ which you want to fetch the blocked or unsubscribed contacts" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 50 + maximum: 100 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document on the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "senders" + in: "query" + description: "Comma separated list of emails of the senders from which contacts\ + \ are blocked or unsubscribed" + required: false + type: "array" + items: + type: "string" + collectionFormat: "csv" + x-exportParamName: "Senders" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "List of blocked or unsubscribed transactional contacts" + examples: + application/json: + contacts: + - email: "abc@xyz.com" + senderEmail: "ez312@gmal.com" + reason: + message: "Admin blocked" + code: "adminBlocked" + blockedAt: "2017-05-01T12:30:00Z" + count: 1 + schema: + $ref: "#/definitions/getTransacBlockedContacts" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/blockedDomains: + get: + tags: + - "Transactional emails" + summary: "Get the list of blocked domains" + description: "Get the list of blocked domains" + operationId: "getBlockedDomains" + parameters: [] + responses: + "200": + description: "List of blocked domains" + examples: + application/json: + domains: + - "example.com" + - "testdomain.com" + schema: + $ref: "#/definitions/getBlockedDomains" + post: + tags: + - "Transactional emails" + summary: "Add a new domain to the list of blocked domains" + description: "Blocks a new domain in order to avoid messages being sent to the\ + \ same" + operationId: "blockNewDomain" + parameters: + - in: "body" + name: "blockDomain" + required: true + schema: + $ref: "#/definitions/blockDomain" + x-exportParamName: "BlockDomain" + responses: + "201": + description: "Domain is successfully blocked" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/blockedDomains/{domain}: + delete: + tags: + - "Transactional emails" + summary: "Unblock an existing domain from the list of blocked domains" + description: "Unblocks an existing domain from the list of blocked domains" + operationId: "deleteBlockedDomain" + parameters: + - name: "domain" + in: "path" + description: "The name of the domain to be deleted" + required: true + type: "string" + x-exportParamName: "Domain" + responses: + "204": + description: "Domain is successfully deleted from the list of blocked domains" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Domain not found" + /smtp/deleteHardbounces: + post: + tags: + - "Transactional emails" + summary: "Delete hardbounces" + description: "Delete hardbounces. To use carefully (e.g. in case of temporary\ + \ ISP failures)" + operationId: "deleteHardbounces" + parameters: + - in: "body" + name: "deleteHardbounces" + description: "values to delete hardbounces" + required: false + schema: + $ref: "#/definitions/deleteHardbounces" + x-exportParamName: "DeleteHardbounces" + responses: + "204": + description: "Hardbounces deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smtp/emailStatus/{batchId}: + get: + tags: + - "Transactional emails" + summary: "Fetch scheduled emails by batchId" + description: "Fetch scheduled batch of emails by batchId (Can retrieve data\ + \ upto 30 days old)" + operationId: "getScheduledEmailByBatchId" + parameters: + - name: "batchId" + in: "path" + description: "The batchId of scheduled emails batch (Should be a valid UUIDv4)" + required: true + type: "string" + x-exportParamName: "BatchId" + - name: "startDate" + in: "query" + description: "Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from\ + \ which you want to fetch the list. Can be maximum 30 days older tha current\ + \ date." + required: false + type: "string" + format: "date" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till\ + \ which you want to fetch the list. Maximum time period that can be selected\ + \ is one month." + required: false + type: "string" + format: "date" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "status" + in: "query" + description: "Filter the records by `status` of the scheduled email batch\ + \ or message." + required: false + type: "string" + enum: + - "processed" + - "inProgress" + - "queued" + x-exportParamName: "Status" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 100 + maximum: 500 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document on the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + responses: + "200": + description: "Scheduled email batches" + examples: + application/json: + count: 3 + batches: + - scheduledAt: "2022-02-28T11:36:43.576000000Z" + createdAt: "2022-02-26T11:36:43.576000000Z" + status: "queued" + - scheduledAt: "2022-02-25T11:36:43.576000000Z" + createdAt: "2022-02-24T11:36:43.576000000Z" + status: "processed" + - scheduledAt: "2022-02-26T11:36:43.576000000Z" + createdAt: "2022-02-25T11:36:43.576000000Z" + status: "inProgress" + schema: + $ref: "#/definitions/getScheduledEmailByBatchId" + "400": + description: "Invalid parameters passed" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Records for batchId not found" + schema: + $ref: "#/definitions/errorModel" + /smtp/emailStatus/{messageId}: + get: + tags: + - "Transactional emails" + summary: "Fetch scheduled email by messageId" + description: "Fetch scheduled email by messageId (Can retrieve data upto 30\ + \ days old)" + operationId: "getScheduledEmailByMessageId" + parameters: + - name: "messageId" + in: "path" + description: "The messageId of scheduled email" + required: true + type: "string" + x-exportParamName: "MessageId" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) from\ + \ which you want to fetch the list. Can be maximum 30 days older tha current\ + \ date." + required: false + type: "string" + format: "date" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) till\ + \ which you want to fetch the list. Maximum time period that can be selected\ + \ is one month." + required: false + type: "string" + format: "date" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + responses: + "200": + description: "Scheduled email" + examples: + application/json: + scheduledAt: "2022-02-28T11:36:43.576000000Z" + createdAt: "2022-02-26T11:36:43.576000000Z" + status: "queued" + schema: + $ref: "#/definitions/getScheduledEmailByMessageId" + "400": + description: "Invalid parameters passed" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Record for messageId not found" + schema: + $ref: "#/definitions/errorModel" + /smtp/email/{identifier}: + delete: + tags: + - "Transactional emails" + summary: "Delete scheduled emails by batchId or messageId" + description: "Delete scheduled batch of emails by batchId or single scheduled\ + \ email by messageId" + operationId: "deleteScheduledEmailById" + parameters: + - name: "identifier" + in: "path" + description: "The `batchId` of scheduled emails batch (Should be a valid UUIDv4)\ + \ or the `messageId` of scheduled email." + required: true + type: "string" + x-exportParamName: "Identifier" + responses: + "204": + description: "Scheduled email(s) deleted" + "400": + description: "Invalid parameters passed" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Record(s) for identifier not found" + schema: + $ref: "#/definitions/errorModel" + /contacts: + get: + tags: + - "Contacts" + summary: "Get all the contacts" + operationId: "getContacts" + parameters: + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + maximum: 1000 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "modifiedSince" + in: "query" + description: "Filter (urlencoded) the contacts modified after a given UTC\ + \ date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in\ + \ date-time format for accurate result." + required: false + type: "string" + x-exportParamName: "ModifiedSince" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "All contacts listed" + examples: + application/json: + contacts: + - email: "contact1@example.com" + id: 247 + emailBlacklisted: true + smsBlacklisted: true + createdAt: "2017-05-01T17:05:03Z" + modifiedAt: "2017-05-01T17:05:03Z" + listIds: + - 43 + - 58 + attributes: + SMS: "33058407250" + IDENTIFICATION: "1-3RHQ-259" + CIV: "MS" + LAST_NAME: "Brennon" + FIRST_NAME: "Meg" + DOB: "1986-05-02" + ADDRESS: "1 5th avenue" + ZIP_CODE: "44300" + CITY: "New-York" + ACTION_CODE: "17HH98CH" + - email: "33058407248@mailin-sms.com" + id: 245 + emailBlacklisted: true + smsBlacklisted: false + createdAt: "2017-05-01T17:05:03Z" + modifiedAt: "2017-05-01T17:05:03Z" + listIds: + - 43 + - 61 + - 58 + attributes: + SMS: "33058407248" + IDENTIFICATION: "1-78JS-432" + CIV: "MS" + LAST_NAME: "Press" + FIRST_NAME: "Sophia" + DOB: "1980-09-11" + ADDRESS: "5 Flower Street" + ZIP_CODE: "44119" + CITY: "Seattle" + ACTION_CODE: "17HU765" + count: 3 + schema: + $ref: "#/definitions/getContacts" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Contacts" + summary: "Create a contact" + operationId: "createContact" + parameters: + - in: "body" + name: "createContact" + description: "Values to create a contact" + required: true + schema: + $ref: "#/definitions/createContact" + x-exportParamName: "CreateContact" + responses: + "201": + description: "Contact created" + schema: + $ref: "#/definitions/createUpdateContactModel" + "204": + description: "Contact updated" + schema: + $ref: "#/definitions/createUpdateContactModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /contacts/doubleOptinConfirmation: + post: + tags: + - "Contacts" + summary: "Create Contact via DOI (Double-Opt-In) Flow" + operationId: "createDoiContact" + parameters: + - in: "body" + name: "createDoiContact" + description: "Values to create the Double opt-in (DOI) contact" + required: true + schema: + $ref: "#/definitions/createDoiContact" + x-exportParamName: "CreateDoiContact" + responses: + "201": + description: "DOI Contact created" + "204": + description: "DOI Contact updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /contacts/{identifier}: + get: + tags: + - "Contacts" + summary: "Get a contact's details" + description: "Along with the contact details, this endpoint will show the statistics\ + \ of contact for the recent 90 days by default. To fetch the earlier statistics,\ + \ please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats)\ + \ endpoint with the appropriate date ranges." + operationId: "getContactInfo" + parameters: + - name: "identifier" + in: "path" + description: "Email (urlencoded) OR ID of the contact OR its SMS attribute\ + \ value" + required: true + type: "string" + x-exportParamName: "Identifier" + - name: "startDate" + in: "query" + description: "**Mandatory if endDate is used.** Starting date (YYYY-MM-DD)\ + \ of the statistic events specific to campaigns. Must be lower than equal\ + \ to endDate\n" + required: false + x-exportParamName: "StartDate" + - name: "endDate" + in: "query" + description: "**Mandatory if startDate is used.** Ending date (YYYY-MM-DD)\ + \ of the statistic events specific to campaigns. Must be greater than equal\ + \ to startDate.\n" + required: false + x-exportParamName: "EndDate" + responses: + "200": + description: "Contact informations" + examples: + application/json: + email: "peggy.rain@example.com" + id: 42 + emailBlacklisted: false + smsBlacklisted: false + createdAt: "2017-05-02T16:40:31Z" + modifiedAt: "2017-05-02T16:40:31Z" + attributes: + FIRST_NAME: "Peggy" + LAST_NAME: "Rain" + SMS: "3087433387669" + CIV: "1" + DOB: "1986-04-13" + ADDRESS: "987 5th avenue" + ZIP_CODE: "87544" + CITY: "New-York" + AREA: "NY" + listIds: + - 40 + statistics: + messagesSent: + - campaignId: 21 + eventTime: "2016-05-03T20:15:13Z" + - campaignId: 42 + eventTime: "2016-10-17T10:30:01Z" + opened: + - campaignId: 21 + count: 2 + eventTime: "2016-05-03T21:24:56Z" + ip: "66.249.93.118" + - campaignId: 68 + count: 1 + eventTime: "2017-01-30T13:56:40Z" + ip: "66.249.93.217" + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: "2016-05-03T21:25:01Z" + ip: "66.249.93.118" + url: "https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=sendinblue&utm_campaign=test_camp&utm_medium=email" + delivered: + - campaignId: 21 + eventTime: "2016-05-03T20:15:13Z" + schema: + $ref: "#/definitions/getExtendedContactDetails" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Contact's email not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Contacts" + summary: "Update a contact" + operationId: "updateContact" + parameters: + - name: "identifier" + in: "path" + description: "Email (urlencoded) OR ID of the contact" + required: true + type: "string" + x-exportParamName: "Identifier" + - in: "body" + name: "updateContact" + description: "Values to update a contact" + required: true + schema: + $ref: "#/definitions/updateContact" + x-exportParamName: "UpdateContact" + responses: + "204": + description: "Contact updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Contact's email not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Contacts" + summary: "Delete a contact" + operationId: "deleteContact" + parameters: + - name: "identifier" + in: "path" + description: "Email (urlencoded) OR ID of the contact" + required: true + type: "string" + x-exportParamName: "Identifier" + responses: + "204": + description: "Contact deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Contact not found" + schema: + $ref: "#/definitions/errorModel" + "405": + description: "You're not allowed to delete registered email contact with\ + \ SendinBlue" + schema: + $ref: "#/definitions/errorModel" + /contacts/batch: + post: + tags: + - "Contacts" + summary: "Update multiple contacts" + operationId: "updateBatchContacts" + parameters: + - in: "body" + name: "updateBatchContacts" + description: "Values to update multiple contacts" + required: true + schema: + $ref: "#/definitions/updateBatchContacts" + x-exportParamName: "UpdateBatchContacts" + responses: + "204": + description: "All contacts updated" + "207": + description: "Few contacts updated" + schema: + $ref: "#/definitions/updateBatchContactsModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /contacts/{identifier}/campaignStats: + get: + tags: + - "Contacts" + summary: "Get email campaigns' statistics for a contact" + operationId: "getContactStats" + parameters: + - name: "identifier" + in: "path" + description: "Email (urlencoded) OR ID of the contact" + required: true + type: "string" + x-exportParamName: "Identifier" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) of\ + \ the statistic events specific to campaigns. Must be lower than equal to\ + \ endDate" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) of\ + \ the statistic events specific to campaigns. Must be greater than equal\ + \ to startDate. Maximum difference between startDate and endDate should\ + \ not be greater than 90 days" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + responses: + "200": + description: "Contact campaign statistics informations" + examples: + application/json: + from: "sendermail@example.com" + tags: + - "tag1" + - "tag2" + messagesSent: + - campaignId: 21 + eventTime: "2016-05-03T20:15:13Z" + - campaignId: 42 + eventTime: "2016-10-17T10:30:01Z" + - campaignId: 45 + eventTime: "2016-11-09T11:45:02Z" + opened: + - campaignId: 21 + count: 2 + eventTime: "2016-05-03T21:24:56Z" + ip: "66.249.93.118" + - campaignId: 45 + count: 1 + eventTime: "2017-01-30T13:56:40Z" + ip: "66.249.93.217" + clicked: + - campaignId: 21 + links: + - count: 2 + eventTime: "2016-05-03T21:25:01Z" + ip: "66.249.93.118" + url: "https://url.domain.com/fbe5387ec717e333628380454f68670010b205ff/1/go?uid={EMAIL}&utm_source=sendinblue&utm_campaign=test_camp&utm_medium=email" + delivered: + - campaignId: 21 + eventTime: "2016-05-03T20:15:13Z" + schema: + $ref: "#/definitions/getContactCampaignStats" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Contact's email not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/attributes: + get: + tags: + - "Contacts" + - "Attributes" + summary: "List all attributes" + operationId: "getAttributes" + parameters: [] + responses: + "200": + description: "Attributes listed" + examples: + application/json: + attributes: + - name: "LASTNAME" + category: "normal" + type: "text" + - name: "FIRSTNAME" + category: "normal" + type: "text" + - name: "DOB" + category: "normal" + type: "date" + - name: "GENDER" + category: "category" + type: "text" + enumeration: + - value: 1 + label: "Men" + - value: 2 + label: "Women" + - value: 3 + label: "Kid" + schema: + $ref: "#/definitions/getAttributes" + /contacts/attributes/{attributeCategory}/{attributeName}: + post: + tags: + - "Contacts" + - "Attributes" + summary: "Create contact attribute" + operationId: "createAttribute" + parameters: + - name: "attributeCategory" + in: "path" + description: "Category of the attribute" + required: true + type: "string" + enum: + - "normal" + - "transactional" + - "category" + - "calculated" + - "global" + x-exportParamName: "AttributeCategory" + - name: "attributeName" + in: "path" + description: "Name of the attribute" + required: true + type: "string" + x-exportParamName: "AttributeName" + - in: "body" + name: "createAttribute" + description: "Values to create an attribute" + required: true + schema: + $ref: "#/definitions/createAttribute" + x-exportParamName: "CreateAttribute" + responses: + "201": + description: "Attribute created" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Contacts" + - "Attributes" + summary: "Update contact attribute" + operationId: "updateAttribute" + parameters: + - name: "attributeCategory" + in: "path" + description: "Category of the attribute" + required: true + type: "string" + enum: + - "category" + - "calculated" + - "global" + x-exportParamName: "AttributeCategory" + - name: "attributeName" + in: "path" + description: "Name of the existing attribute" + required: true + type: "string" + x-exportParamName: "AttributeName" + - in: "body" + name: "updateAttribute" + description: "Values to update an attribute" + required: true + schema: + $ref: "#/definitions/updateAttribute" + x-exportParamName: "UpdateAttribute" + responses: + "204": + description: "Attribute updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Attribute not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Contacts" + - "Attributes" + summary: "Delete an attribute" + operationId: "deleteAttribute" + parameters: + - name: "attributeCategory" + in: "path" + description: "Category of the attribute" + required: true + type: "string" + enum: + - "normal" + - "transactional" + - "category" + - "calculated" + - "global" + x-exportParamName: "AttributeCategory" + - name: "attributeName" + in: "path" + description: "Name of the existing attribute" + required: true + type: "string" + x-exportParamName: "AttributeName" + responses: + "204": + description: "Attribute deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Attribute not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/folders: + get: + tags: + - "Contacts" + - "Folders" + summary: "Get all folders" + operationId: "getFolders" + parameters: + - name: "limit" + in: "query" + description: "Number of documents per page" + required: true + type: "integer" + default: 10 + maximum: 50 + format: "int64" + x-exportParamName: "Limit" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: true + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Folders informations" + examples: + application/json: + folders: + - id: 42 + name: "Ninja_Form" + totalBlacklisted: 98 + totalSubscribers: 4567 + uniqueSubscribers: 4665 + - id: 29 + name: "Prestashop" + totalBlacklisted: 10 + totalSubscribers: 6543 + uniqueSubscribers: 6553 + count: 2 + schema: + $ref: "#/definitions/getFolders" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Contacts" + - "Folders" + summary: "Create a folder" + operationId: "createFolder" + parameters: + - in: "body" + name: "createFolder" + description: "Name of the folder" + required: true + schema: + $ref: "#/definitions/createUpdateFolder" + x-exportParamName: "CreateFolder" + responses: + "201": + description: "Folder created" + schema: + $ref: "#/definitions/createModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /contacts/folders/{folderId}: + get: + tags: + - "Contacts" + - "Folders" + summary: "Returns a folder's details" + operationId: "getFolder" + parameters: + - name: "folderId" + in: "path" + description: "id of the folder" + required: true + type: "integer" + format: "int64" + x-exportParamName: "FolderId" + responses: + "200": + description: "Folder details" + examples: + application/json: + id: 1 + name: "Client_Folder" + totalBlacklisted: 987 + totalSubscribers: 16778 + uniqueSubscribers: 17765 + schema: + $ref: "#/definitions/getFolder" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Folder ID not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Contacts" + - "Folders" + summary: "Update a folder" + operationId: "updateFolder" + parameters: + - name: "folderId" + in: "path" + description: "Id of the folder" + required: true + type: "integer" + format: "int64" + x-exportParamName: "FolderId" + - in: "body" + name: "updateFolder" + description: "Name of the folder" + required: true + schema: + $ref: "#/definitions/createUpdateFolder" + x-exportParamName: "UpdateFolder" + responses: + "204": + description: "Folder updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Folder ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Contacts" + - "Folders" + summary: "Delete a folder (and all its lists)" + operationId: "deleteFolder" + parameters: + - name: "folderId" + in: "path" + description: "Id of the folder" + required: true + type: "integer" + format: "int64" + x-exportParamName: "FolderId" + responses: + "204": + description: "Folder deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Folder ID not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/folders/{folderId}/lists: + get: + tags: + - "Contacts" + - "Folders" + - "Lists" + summary: "Get lists in a folder" + operationId: "getFolderLists" + parameters: + - name: "folderId" + in: "path" + description: "Id of the folder" + required: true + type: "integer" + format: "int64" + x-exportParamName: "FolderId" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 10 + maximum: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Folder's Lists details" + examples: + application/json: + lists: + - id: 46 + name: "Reactiv" + totalSubscribers: 7655 + totalBlacklisted: 0 + uniqueSubscribers: 7655 + - id: 41 + name: "NY_Area" + totalSubscribers: 3654 + totalBlacklisted: 23 + uniqueSubscribers: 3677 + - id: 22 + name: "VIP_Customer" + totalSubscribers: 8753 + totalBlacklisted: 72 + uniqueSubscribers: 8826 + count: 3 + schema: + $ref: "#/definitions/getFolderLists" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Folder ID not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/lists: + get: + tags: + - "Contacts" + - "Lists" + summary: "Get all the lists" + operationId: "getLists" + parameters: + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 10 + maximum: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Lists informations" + examples: + application/json: + lists: + - id: 53 + name: "Spanish_Speakers" + totalSubscribers: 5432 + totalBlacklisted: 65 + uniqueSubscribers: 5497 + folderId: 1 + - id: 50 + name: "Other" + totalSubscribers: 10976 + totalBlacklisted: 765 + uniqueSubscribers: 11741 + folderId: 2 + count: 2 + schema: + $ref: "#/definitions/getLists" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Contacts" + - "Lists" + summary: "Create a list" + operationId: "createList" + parameters: + - in: "body" + name: "createList" + description: "Values to create a list" + required: true + schema: + $ref: "#/definitions/createList" + x-exportParamName: "CreateList" + responses: + "201": + description: "List created" + schema: + $ref: "#/definitions/createModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /contacts/lists/{listId}: + get: + tags: + - "Contacts" + - "Lists" + summary: "Get a list's details" + operationId: "getList" + parameters: + - name: "listId" + in: "path" + description: "Id of the list" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ListId" + responses: + "200": + description: "List informations" + examples: + application/json: + id: 12 + name: "Newsletter_Weekly" + totalSubscribers: 6533 + totalBlacklisted: 63 + uniqueSubscribers: 6596 + folderId: 1 + createdAt: "2016-02-26T11:56:08Z" + campaignStats: + - campaignId: 15 + stats: + uniqueClicks: 701 + clickers: 789 + complaints: 0 + delivered: 6632 + sent: 6645 + softBounces: 34 + hardBounces: 4 + uniqueViews: 3442 + unsubscriptions: 4 + viewed: 4322 + deferred: 0 + - campaignId: 45 + stats: + uniqueClicks: 654 + clickers: 788 + complaints: 1 + delivered: 4078 + sent: 4334 + softBounces: 18 + hardBounces: 2 + uniqueViews: 987 + unsubscriptions: 4 + viewed: 1555 + deferred: 0 + dynamicList: false + schema: + $ref: "#/definitions/getExtendedList" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "List ID not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Contacts" + - "Lists" + summary: "Update a list" + operationId: "updateList" + parameters: + - name: "listId" + in: "path" + description: "Id of the list" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ListId" + - in: "body" + name: "updateList" + description: "Values to update a list" + required: true + schema: + $ref: "#/definitions/updateList" + x-exportParamName: "UpdateList" + responses: + "204": + description: "List updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "List ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Contacts" + - "Lists" + summary: "Delete a list" + operationId: "deleteList" + parameters: + - name: "listId" + in: "path" + description: "Id of the list" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ListId" + responses: + "204": + description: "List deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "List ID not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/lists/{listId}/contacts: + get: + tags: + - "Contacts" + - "Lists" + summary: "Get contacts in a list" + operationId: "getContactsFromList" + parameters: + - name: "listId" + in: "path" + description: "Id of the list" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ListId" + - name: "modifiedSince" + in: "query" + description: "Filter (urlencoded) the contacts modified after a given UTC\ + \ date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in\ + \ date-time format for accurate result." + required: false + type: "string" + x-exportParamName: "ModifiedSince" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + maximum: 500 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Contact informations" + examples: + application/json: + contacts: + - email: "alex.pain@example.com" + id: 45 + emailBlacklisted: false + smsBlacklisted: true + createdAt: "2017-05-12T12:30:00Z" + modifiedAt: "2017-05-12T12:30:00Z" + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + - 2 + attributes: + LASTNAME: "Pain" + FIRSTNAME: "Alex" + DOB: "2010-12-31" + GENDER: "Kid" + - email: "john.smith@example.com" + id: 32 + emailBlacklisted: true + smsBlacklisted: false + createdAt: "2017-05-12T12:30:00Z" + modifiedAt: "2017-05-12T12:30:00Z" + listIds: + - 12 + listUnsubscribed: + - 1 + attributes: + LASTNAME: "Smith" + FIRSTNAME: "John" + DOB: "1986-06-21" + GENDER: "Men" + - email: "helen.rose@example.com" + id: 65 + emailBlacklisted: true + smsBlacklisted: false + createdAt: "2017-05-12T12:30:00Z" + modifiedAt: "2017-05-12T12:30:00Z" + listIds: + - 12 + - 9 + - 20 + listUnsubscribed: + - 1 + attributes: + LASTNAME: "Rose" + FIRSTNAME: "Helen" + DOB: "1988-11-02" + GENDER: "Women" + SMS: "3375599887766" + count: 17655 + schema: + $ref: "#/definitions/getContacts" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "List ID not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/lists/{listId}/contacts/add: + post: + tags: + - "Contacts" + - "Lists" + summary: "Add existing contacts to a list" + operationId: "addContactToList" + parameters: + - name: "listId" + in: "path" + description: "Id of the list" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ListId" + - in: "body" + name: "contactEmails" + description: "Emails addresses OR IDs of the contacts" + required: true + schema: + $ref: "#/definitions/addContactToList" + x-exportParamName: "ContactEmails" + responses: + "201": + description: "All contacts have been added successfully to the list with\ + \ details of failed ones" + schema: + $ref: "#/definitions/postContactInfo" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "List ID not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/lists/{listId}/contacts/remove: + post: + tags: + - "Contacts" + - "Lists" + summary: "Delete a contact from a list" + operationId: "removeContactFromList" + parameters: + - name: "listId" + in: "path" + description: "Id of the list" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ListId" + - in: "body" + name: "contactEmails" + description: "Emails addresses OR IDs of the contacts" + required: true + schema: + $ref: "#/definitions/removeContactFromList" + x-exportParamName: "ContactEmails" + responses: + "201": + description: "All contacts have been removed successfully from the list\ + \ with details of failed ones" + schema: + $ref: "#/definitions/postContactInfo" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "List ID not found" + schema: + $ref: "#/definitions/errorModel" + /contacts/export: + post: + tags: + - "Contacts" + summary: "Export contacts" + description: "It returns the background process ID which on completion calls\ + \ the notify URL that you have set in the input. File will be available in\ + \ csv." + operationId: "requestContactExport" + parameters: + - in: "body" + name: "requestContactExport" + description: "Values to request a contact export" + required: true + schema: + $ref: "#/definitions/requestContactExport" + x-exportParamName: "RequestContactExport" + responses: + "202": + description: "Contact export request has been accepted" + schema: + $ref: "#/definitions/createdProcessId" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /contacts/import: + post: + tags: + - "Contacts" + summary: "Import contacts" + description: "It returns the background process ID which on completion calls\ + \ the notify URL that you have set in the input." + operationId: "importContacts" + parameters: + - in: "body" + name: "requestContactImport" + description: "Values to import contacts in Sendinblue. To know more about\ + \ the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``" + required: true + schema: + $ref: "#/definitions/requestContactImport" + x-exportParamName: "RequestContactImport" + responses: + "202": + description: "Contact import request has been accepted" + schema: + $ref: "#/definitions/createdProcessId" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns: + get: + tags: + - "SMS Campaigns" + summary: "Returns the information for all your created SMS campaigns" + operationId: "getSmsCampaigns" + parameters: + - name: "status" + in: "query" + description: "Status of campaign." + required: false + type: "string" + enum: + - "suspended" + - "archive" + - "sent" + - "queued" + - "draft" + - "inProcess" + x-exportParamName: "Status" + x-optionalDataType: "String" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting (urlencoded) UTC date-time\ + \ (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to\ + \ pass your timezone in date-time format for accurate result ( only available\ + \ if either 'status' not passed and if passed is set to 'sent' )" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending (urlencoded) UTC date-time\ + \ (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to\ + \ pass your timezone in date-time format for accurate result ( only available\ + \ if either 'status' not passed and if passed is set to 'sent' )" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number limitation for the result returned" + required: false + type: "integer" + default: 500 + maximum: 1000 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Beginning point in the list to retrieve from." + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "SMS campaigns informations" + examples: + application/json: + campaigns: + - id: 2 + name: "PROMO CODE" + status: "sent" + content: "Visit our Store and get some discount !" + scheduledAt: "2017-06-01T12:30:00Z" + testSent: true + sender: "MyCompany" + createdAt: "2017-06-01T12:30:00Z" + modifiedAt: "2017-05-01T12:30:00Z" + sentDate: "2017-06-01T12:30:00Z" + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + - id: 10 + name: "SUMMER SALE" + status: "draft" + content: "Summer Sale is starting tomorrow. Get extra 10% with this\ + \ code:SUM17" + scheduledAt: "2017-08-04T12:30:00Z" + testSent: false + sender: "MyCompany" + createdAt: "2017-06-01T12:30:00Z" + modifiedAt: "2017-05-01T12:30:00Z" + sentDate: "2017-06-01T12:30:00Z" + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + count: 12 + schema: + $ref: "#/definitions/getSmsCampaigns" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "SMS Campaigns" + summary: "Creates an SMS campaign" + operationId: "createSmsCampaign" + parameters: + - in: "body" + name: "createSmsCampaign" + description: "Values to create an SMS Campaign" + required: true + schema: + $ref: "#/definitions/createSmsCampaign" + x-exportParamName: "CreateSmsCampaign" + responses: + "201": + description: "SMS campaign created" + schema: + $ref: "#/definitions/createModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns/{campaignId}: + get: + tags: + - "SMS Campaigns" + summary: "Get an SMS campaign" + operationId: "getSmsCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "id of the SMS campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "200": + description: "SMS campaign informations" + examples: + application/json: + id: 2 + name: "PROMO CODE" + status: "sent" + content: "Visit our Store and get some discount !" + scheduledAt: "2017-06-01T12:30:00Z" + testSent: true + sender: "MyCompany" + createdAt: "2017-06-01T12:30:00Z" + modifiedAt: "2017-05-01T12:30:00Z" + recipients: + lists: + - 21 + exclusionLists: + - 13 + statistics: + delivered: 2987 + sent: 3000 + processing: 0 + softBounces: 3 + hardBounces: 1 + unsubscriptions: 3 + answered: 2 + schema: + $ref: "#/definitions/getSmsCampaign" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "SMS Campaigns" + summary: "Update an SMS campaign" + operationId: "updateSmsCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "id of the SMS campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "updateSmsCampaign" + description: "Values to update an SMS Campaign" + required: true + schema: + $ref: "#/definitions/updateSmsCampaign" + x-exportParamName: "UpdateSmsCampaign" + responses: + "204": + description: "SMS campaign updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "SMS Campaigns" + summary: "Delete an SMS campaign" + operationId: "deleteSmsCampaign" + parameters: + - name: "campaignId" + in: "path" + description: "id of the SMS campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "204": + description: "SMS campaign has been deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns/{campaignId}/sendNow: + post: + tags: + - "SMS Campaigns" + summary: "Send your SMS campaign immediately" + operationId: "sendSmsCampaignNow" + parameters: + - name: "campaignId" + in: "path" + description: "id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + responses: + "204": + description: "SMS campaign has been scheduled" + "400": + description: "SMS Campaign could not be sent" + schema: + $ref: "#/definitions/errorModel" + "402": + description: "You don't have enough credit to send your campaign. Please\ + \ update your plan" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns/{campaignId}/status: + put: + tags: + - "SMS Campaigns" + summary: "Update a campaign's status" + operationId: "updateSmsCampaignStatus" + parameters: + - name: "campaignId" + in: "path" + description: "id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "status" + description: "Status of the campaign." + required: true + schema: + $ref: "#/definitions/updateCampaignStatus" + x-exportParamName: "Status" + responses: + "204": + description: "The campaign status has been updated successfully" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns/{campaignId}/sendTest: + post: + tags: + - "SMS Campaigns" + summary: "Send a test SMS campaign" + operationId: "sendTestSms" + parameters: + - name: "campaignId" + in: "path" + description: "Id of the SMS campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "phoneNumber" + description: "Mobile number of the recipient with the country code. This number\ + \ must belong to one of your contacts in SendinBlue account and must not\ + \ be blacklisted" + required: true + schema: + $ref: "#/definitions/sendTestSms" + x-exportParamName: "PhoneNumber" + responses: + "204": + description: "Test SMS has been sent successfully to the recipient" + "400": + description: "Test SMS could not be sent to the following email addresses" + schema: + $ref: "#/definitions/postSendSmsTestFailed" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns/{campaignId}/exportRecipients: + post: + tags: + - "SMS Campaigns" + summary: "Export an SMS campaign's recipients" + description: "It returns the background process ID which on completion calls\ + \ the notify URL that you have set in the input." + operationId: "requestSmsRecipientExport" + parameters: + - name: "campaignId" + in: "path" + description: "id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "recipientExport" + description: "Values to send for a recipient export request" + required: false + schema: + $ref: "#/definitions/requestSmsRecipientExport" + x-exportParamName: "RecipientExport" + responses: + "202": + description: "Recipient export request has been accepted" + schema: + $ref: "#/definitions/createdProcessId" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /smsCampaigns/{campaignId}/sendReport: + post: + tags: + - "SMS Campaigns" + summary: "Send an SMS campaign's report" + description: "Send report of Sent and Archived campaign, to the specified email\ + \ addresses, with respective data and a pdf attachment in detail." + operationId: "sendSmsReport" + parameters: + - name: "campaignId" + in: "path" + description: "id of the campaign" + required: true + type: "integer" + format: "int64" + x-exportParamName: "CampaignId" + - in: "body" + name: "sendReport" + description: "Values for send a report" + required: true + schema: + $ref: "#/definitions/sendReport" + x-exportParamName: "SendReport" + responses: + "204": + description: "Report has been successfully sent to the defined recipients" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Campaign ID not found" + schema: + $ref: "#/definitions/errorModel" + /transactionalSMS/sms: + post: + tags: + - "Transactional SMS" + summary: "Send SMS message to a mobile number" + operationId: "sendTransacSms" + parameters: + - in: "body" + name: "sendTransacSms" + description: "Values to send a transactional SMS" + required: true + schema: + $ref: "#/definitions/sendTransacSms" + x-exportParamName: "SendTransacSms" + responses: + "201": + description: "SMS has been sent successfully to the recipient" + schema: + $ref: "#/definitions/sendSms" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "402": + description: "You don't have enough credit to send your SMS. Please update\ + \ your plan" + schema: + $ref: "#/definitions/errorModel" + /transactionalSMS/statistics/aggregatedReport: + get: + tags: + - "Transactional SMS" + summary: "Get your SMS activity aggregated over a period of time" + operationId: "getTransacAggregatedSmsReport" + parameters: + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) of\ + \ the report" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) of\ + \ the report" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "days" + in: "query" + description: "Number of days in the past including today (positive integer).\ + \ Not compatible with startDate and endDate" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Days" + x-optionalDataType: "Int64" + - name: "tag" + in: "query" + description: "Filter on a tag" + required: false + type: "string" + x-exportParamName: "Tag" + x-optionalDataType: "String" + responses: + "200": + description: "Aggregated SMS report informations" + examples: + application/json: + range: "2015-05-22|2017-11-29" + requests: 54 + delivered: 16 + hardBounces: 5 + softBounces: 26 + blocked: 4 + unsubscribed: 10 + replied: 8 + accepted: 6 + rejected: 14 + schema: + $ref: "#/definitions/getTransacAggregatedSmsReport" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /transactionalSMS/statistics/reports: + get: + tags: + - "Transactional SMS" + summary: "Get your SMS activity aggregated per day" + operationId: "getTransacSmsReport" + parameters: + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) of\ + \ the report" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) of\ + \ the report" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "days" + in: "query" + description: "Number of days in the past including today (positive integer).\ + \ Not compatible with 'startDate' and 'endDate'" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Days" + x-optionalDataType: "Int64" + - name: "tag" + in: "query" + description: "Filter on a tag" + required: false + type: "string" + x-exportParamName: "Tag" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Aggregated SMS report informations" + examples: + application/json: + reports: + - date: "2017-04-30" + requests: 10756 + delivered: 10103 + hardBounces: 21 + softBounces: 137 + blocked: 1026 + unsubscribed: 720 + replied: 5091 + accepted: 2318 + rejected: 0 + - date: "2017-05-01" + requests: 18812 + delivered: 17499 + hardBounces: 34 + softBounces: 254 + blocked: 1514 + unsubscribed: 1090 + replied: 10089 + accepted: 4393 + rejected: 0 + - date: "2017-05-02" + requests: 14321 + delivered: 13427 + hardBounces: 16 + softBounces: 176 + blocked: 1646 + unsubscribed: 1170 + replied: 11563 + accepted: 4689 + rejected: 0 + schema: + $ref: "#/definitions/getTransacSmsReport" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /transactionalSMS/statistics/events: + get: + tags: + - "Transactional SMS" + summary: "Get all your SMS activity (unaggregated events)" + operationId: "getSmsEvents" + parameters: + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + maximum: 100 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) of\ + \ the report" + required: false + type: "string" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) of\ + \ the report" + required: false + type: "string" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "days" + in: "query" + description: "Number of days in the past including today (positive integer).\ + \ Not compatible with 'startDate' and 'endDate'" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Days" + x-optionalDataType: "Int64" + - name: "phoneNumber" + in: "query" + description: "Filter the report for a specific phone number" + required: false + type: "string" + x-exportParamName: "PhoneNumber" + x-optionalDataType: "String" + - name: "event" + in: "query" + description: "Filter the report for specific events" + required: false + type: "string" + enum: + - "bounces" + - "hardBounces" + - "softBounces" + - "delivered" + - "sent" + - "accepted" + - "unsubscription" + - "replies" + - "blocked" + x-exportParamName: "Event" + x-optionalDataType: "String" + - name: "tags" + in: "query" + description: "Filter the report for specific tags passed as a serialized urlencoded\ + \ array" + required: false + type: "string" + x-exportParamName: "Tags" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Sms events report informations" + examples: + application/json: + events: + - phoneNumber: "00911059469013" + date: "2015-05-20T12:30:00Z" + messageId: "1473139351170140" + event: "sent" + reason: "Recipient is currently unreachable" + tag: "cabWaiting" + - phoneNumber: "00911059469013" + date: "2015-05-20T16:30:00Z" + messageId: "1473139351170140" + event: "delivered" + reason: "Recipient is currently unreachable" + tag: "cabRequest" + schema: + $ref: "#/definitions/getSmsEventReport" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /senders: + get: + tags: + - "Senders" + summary: "Get the list of all your senders" + operationId: "getSenders" + parameters: + - name: "ip" + in: "query" + description: "Filter your senders for a specific ip (available for dedicated\ + \ IP usage only)" + required: false + type: "string" + x-exportParamName: "Ip" + x-optionalDataType: "String" + - name: "domain" + in: "query" + description: "Filter your senders for a specific domain" + required: false + type: "string" + x-exportParamName: "Domain" + x-optionalDataType: "String" + responses: + "200": + description: "list of senders" + examples: + application/json: + senders: + - id: 1 + name: "Marketing" + email: "marketing@mycompany.com" + active: true + ips: + - ip: "123.98.689.7" + domain: "mycompany.com" + weight: 100 + - id: 2 + name: "Newsletter" + email: "newsletter@mycompany.com" + active: false + ips: + - ip: "123.98.689.7" + domain: "mycompany.com" + weight: 50 + - ip: "123.98.643.2" + domain: "news.mycompany.com" + weight: 50 + schema: + $ref: "#/definitions/getSendersList" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Senders" + summary: "Create a new sender" + operationId: "createSender" + parameters: + - in: "body" + name: "sender" + description: "sender's name" + required: false + schema: + $ref: "#/definitions/createSender" + x-exportParamName: "Sender" + responses: + "201": + description: "sender created" + schema: + $ref: "#/definitions/createSenderModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /senders/{senderId}: + put: + tags: + - "Senders" + summary: "Update a sender" + operationId: "updateSender" + parameters: + - name: "senderId" + in: "path" + description: "Id of the sender" + required: true + type: "integer" + format: "int64" + x-exportParamName: "SenderId" + - in: "body" + name: "sender" + description: "sender's name" + required: false + schema: + $ref: "#/definitions/updateSender" + x-exportParamName: "Sender" + responses: + "204": + description: "sender updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Sender ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Senders" + summary: "Delete a sender" + operationId: "deleteSender" + parameters: + - name: "senderId" + in: "path" + description: "Id of the sender" + required: true + type: "integer" + format: "int64" + x-exportParamName: "SenderId" + responses: + "204": + description: "sender deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Sender ID not found" + schema: + $ref: "#/definitions/errorModel" + /senders/{senderId}/ips: + get: + tags: + - "Senders" + summary: "Get all the dedicated IPs for a sender" + operationId: "getIpsFromSender" + parameters: + - name: "senderId" + in: "path" + description: "Id of the sender" + required: true + type: "integer" + format: "int64" + x-exportParamName: "SenderId" + responses: + "200": + description: "list of dedicated IPs" + examples: + application/json: + ips: + - id: 3 + ip: "123.65.8.22" + domain: "mailing.myshop.dom" + weight: 40 + - id: 5 + ip: "123.43.21.3" + domain: "newsletter.myshop.dom" + weight: 60 + schema: + $ref: "#/definitions/getIpsFromSender" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Sender ID not found" + schema: + $ref: "#/definitions/errorModel" + /senders/ips: + get: + tags: + - "Senders" + summary: "Get all the dedicated IPs for your account" + operationId: "getIps" + parameters: [] + responses: + "200": + description: "list of dedicated IPs" + examples: + application/json: + ips: + - id: 3 + ip: "67.145.89.3" + active: true + domain: "mailing.myshop.com" + - id: 5 + ip: "76.76.125.9" + active: true + domain: "newsletter.myshop.com" + - id: 6 + ip: "123.65.8.22" + active: false + domain: "notifications.myshop.com" + schema: + $ref: "#/definitions/getIps" + /webhooks: + get: + tags: + - "Webhooks" + summary: "Get all webhooks" + operationId: "getWebhooks" + parameters: + - name: "type" + in: "query" + description: "Filter on webhook type" + required: false + type: "string" + default: "transactional" + enum: + - "marketing" + - "transactional" + - "inbound" + x-exportParamName: "Type_" + x-optionalDataType: "String" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of webhook\ + \ creation" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Webhooks informations" + examples: + application/json: + webhooks: + - url: "https://example.domain.com/webhook/events/kzfxxxxxxxx0uyo1" + id: 9864 + description: "Webhook triggered on campaign openings" + events: + - "opened" + type: "transac" + createdAt: "2016-07-18T12:30:09Z" + modifiedAt: "2016-07-18T16:00:50Z" + - url: "http://exmaple.domain.com/15kxxxxxn1" + id: 22770 + description: "Webhook triggered on campaign hard bounces" + events: + - "hardBounces" + type: "marketing" + createdAt: "2017-02-20T14:30:00Z" + modifiedAt: "2017-02-20T19:00:00Z" + schema: + $ref: "#/definitions/getWebhooks" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Webhooks" + summary: "Create a webhook" + operationId: "createWebhook" + parameters: + - in: "body" + name: "createWebhook" + description: "Values to create a webhook" + required: true + schema: + $ref: "#/definitions/createWebhook" + x-exportParamName: "CreateWebhook" + responses: + "201": + description: "Webhook created" + schema: + $ref: "#/definitions/createModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /webhooks/{webhookId}: + get: + tags: + - "Webhooks" + summary: "Get a webhook details" + operationId: "getWebhook" + parameters: + - name: "webhookId" + in: "path" + description: "Id of the webhook" + required: true + type: "integer" + format: "int64" + x-exportParamName: "WebhookId" + responses: + "200": + description: "Webhook informations" + examples: + application/json: + url: "http://example.domain.com/1brxxxxxx5p1" + id: 7287 + description: "Webhook triggered on campaign openings and addition of\ + \ lists" + events: + - "listAdditions" + - "opened" + type: "marketing" + createdAt: "2016-06-07T09:10:10Z" + modifiedAt: "2016-06-08T11:30:00Z" + schema: + $ref: "#/definitions/getWebhook" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Webhook ID not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Webhooks" + summary: "Update a webhook" + operationId: "updateWebhook" + parameters: + - name: "webhookId" + in: "path" + description: "Id of the webhook" + required: true + type: "integer" + format: "int64" + x-exportParamName: "WebhookId" + - in: "body" + name: "updateWebhook" + description: "Values to update a webhook" + required: true + schema: + $ref: "#/definitions/updateWebhook" + x-exportParamName: "UpdateWebhook" + responses: + "204": + description: "Webhook updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Webhook ID not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Webhooks" + summary: "Delete a webhook" + operationId: "deleteWebhook" + parameters: + - name: "webhookId" + in: "path" + description: "Id of the webhook" + required: true + type: "integer" + format: "int64" + x-exportParamName: "WebhookId" + responses: + "204": + description: "Webhook deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Webhook ID not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children: + get: + tags: + - "Reseller" + summary: "Get the list of all children accounts" + operationId: "getResellerChilds" + parameters: + - name: "limit" + in: "query" + description: "Number of documents for child accounts information per page" + required: false + type: "integer" + default: 10 + maximum: 20 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document in the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + responses: + "200": + description: "list of children" + examples: + application/json: + children: + - email: "john.smith@example.com" + firstName: "John" + lastName: "Smith" + companyName: "MyCompany" + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: "abC0xxxxxx3jkL" + ips: + - "176.2.39.4" + - "231.43.21.7" + apiKeys: + v2: + - name: "N˚2" + key: "nOpxxxxxy7z" + v3: + - name: "N˚3" + key: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + id: 187588 + - email: "alex.pain@example.com" + firstName: "Alex" + lastName: "Pain" + companyName: "MyStore" + credits: + emailCredits: 2000 + smsCredits: 0 + statistics: + previousMonthTotalSent: 654 + currentMonthTotalSent: 300 + totalSent: 6553 + password: "abC0xxxxx64kL" + ips: + - "176.2.39.4" + - "231.43.21.7" + apiKeys: + v2: + - name: "N˚2" + key: "nOpxxxxxy7z" + v3: + - name: "N˚3" + key: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + id: 187669 + schema: + $ref: "#/definitions/getChildrenList" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Reseller" + summary: "Creates a reseller child" + operationId: "createResellerChild" + parameters: + - in: "body" + name: "resellerChild" + description: "reseller child to add" + required: false + schema: + $ref: "#/definitions/createChild" + x-exportParamName: "ResellerChild" + responses: + "201": + description: "child created" + schema: + $ref: "#/definitions/createReseller" + "400": + description: "Bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}: + get: + tags: + - "Reseller" + summary: "Get a child account's details" + operationId: "getChildInfo" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + responses: + "200": + description: "Information for the child" + examples: + application/json: + email: "john.smith@example.com" + firstName: "John" + lastName: "Smith" + companyName: "MyCompany" + credits: + emailCredits: 98555 + smsCredits: 87556 + statistics: + previousMonthTotalSent: 7654 + currentMonthTotalSent: 4566 + totalSent: 987554 + password: "abC0xxxxx3jkL" + ips: + - "176.2.39.4" + - "231.43.21.7" + apiKeys: + v2: + - name: "N˚2" + key: "nOpxxxxxy7z" + v3: + - name: "N˚3" + key: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + schema: + $ref: "#/definitions/getChildInfo" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + put: + tags: + - "Reseller" + summary: "Update info of reseller's child based on the child identifier supplied" + operationId: "updateResellerChild" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "resellerChild" + description: "values to update in child profile" + required: true + schema: + $ref: "#/definitions/updateChild" + x-exportParamName: "ResellerChild" + responses: + "204": + description: "reseller's child updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Reseller" + summary: "Delete a single reseller child based on the child identifier supplied" + operationId: "deleteResellerChild" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or child id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + responses: + "204": + description: "child deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/accountStatus: + put: + tags: + - "Reseller" + summary: "Update info of reseller's child account status based on the childIdentifier\ + \ supplied" + operationId: "updateChildAccountStatus" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "updateChildAccountStatus" + description: "values to update in child account status" + required: true + schema: + $ref: "#/definitions/updateChildAccountStatus" + x-exportParamName: "UpdateChildAccountStatus" + responses: + "204": + description: "reseller's child account status updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/accountCreationStatus: + get: + tags: + - "Reseller" + summary: "Get the status of a reseller's child account creation, whether it\ + \ is successfully created (exists) or not based on the identifier supplied" + operationId: "getChildAccountCreationStatus" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + responses: + "200": + description: "status of reseller's child account" + examples: + application/json: + childAccountCreated: true + schema: + $ref: "#/definitions/getChildAccountCreationStatus" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/ips/associate: + post: + tags: + - "Reseller" + summary: "Associate a dedicated IP to the child" + operationId: "associateIpToChild" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "ip" + description: "IP to associate" + required: true + schema: + $ref: "#/definitions/manageIp" + x-exportParamName: "Ip" + responses: + "204": + description: "Dedicated IP is associated to the child" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/ips/dissociate: + post: + tags: + - "Reseller" + summary: "Dissociate a dedicated IP to the child" + operationId: "dissociateIpFromChild" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "ip" + description: "IP to dissociate" + required: true + schema: + $ref: "#/definitions/manageIp" + x-exportParamName: "Ip" + responses: + "204": + description: "Dedicated IP is dissociated from the child" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/credits/add: + post: + tags: + - "Reseller" + summary: "Add Email and/or SMS credits to a specific child account" + operationId: "addCredits" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "addCredits" + description: "Values to post to add credit to a specific child account" + required: true + schema: + $ref: "#/definitions/addCredits" + x-exportParamName: "AddCredits" + responses: + "200": + description: "Credits added" + examples: + application/json: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + schema: + $ref: "#/definitions/remainingCreditModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/credits/remove: + post: + tags: + - "Reseller" + summary: "Remove Email and/or SMS credits from a specific child account" + operationId: "removeCredits" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "removeCredits" + description: "Values to post to remove email or SMS credits from a specific\ + \ child account" + required: true + schema: + $ref: "#/definitions/removeCredits" + x-exportParamName: "RemoveCredits" + responses: + "200": + description: "Credits removed" + examples: + application/json: + child: + sms: 500 + email: 2000 + reseller: + sms: 12900 + email: 2000000 + schema: + $ref: "#/definitions/remainingCreditModel" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/domains: + get: + tags: + - "Reseller" + summary: "Get all sender domains for a specific child account" + operationId: "getChildDomains" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + responses: + "200": + description: "Sender domains of the child" + examples: + application/json: + - domain: "mycustomdomain.com" + active: true + - domain: "mynewdomain.com" + active: true + schema: + $ref: "#/definitions/getChildDomains" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Reseller" + summary: "Create a domain for a child account" + operationId: "createChildDomain" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - in: "body" + name: "addChildDomain" + description: "Sender domain to add for a specific child account. This will\ + \ not be displayed to the parent account." + required: true + schema: + $ref: "#/definitions/addChildDomain" + x-exportParamName: "AddChildDomain" + responses: + "201": + description: "Domain added" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/domains/{domainName}: + put: + tags: + - "Reseller" + summary: "Update the sender domain of reseller's child based on the childIdentifier\ + \ and domainName passed" + operationId: "updateChildDomain" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - name: "domainName" + in: "path" + description: "Pass the existing domain that needs to be updated" + required: true + type: "string" + x-exportParamName: "DomainName" + - in: "body" + name: "updateChildDomain" + description: "value to update for sender domain" + required: true + schema: + $ref: "#/definitions/updateChildDomain" + x-exportParamName: "UpdateChildDomain" + responses: + "204": + description: "reseller's child domain updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Reseller" + summary: "Delete the sender domain of the reseller child based on the childIdentifier\ + \ and domainName passed" + operationId: "deleteChildDomain" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + - name: "domainName" + in: "path" + description: "Pass the existing domain that needs to be deleted" + required: true + type: "string" + x-exportParamName: "DomainName" + responses: + "204": + description: "child domain deleted" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /reseller/children/{childIdentifier}/auth: + get: + tags: + - "Reseller" + summary: "Get session token to access Sendinblue (SSO)" + description: "It returns a session [token] which will remain valid for a short\ + \ period of time. A child account will be able to access a white-labeled section\ + \ by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token]" + operationId: "getSsoToken" + parameters: + - name: "childIdentifier" + in: "path" + description: "Either auth key or id of reseller's child" + required: true + type: "string" + x-exportParamName: "ChildIdentifier" + responses: + "200": + description: "Session token" + examples: + application/json: + token: "5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0" + schema: + $ref: "#/definitions/getSsoToken" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a reseller" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Child auth key or child id not found" + schema: + $ref: "#/definitions/errorModel" + /account: + get: + tags: + - "Account" + summary: "Get your account information, plan and credits details" + operationId: "getAccount" + parameters: [] + responses: + "200": + description: "account informations" + examples: + application/json: + plan: + - type: "payAsYouGo" + credits: 5000 + creditsType: "sendLimit" + - type: "subscription" + credits: 39983 + creditsType: "sendLimit" + startDate: "2017-03-11" + endDate: "2017-04-11" + - type: "sms" + credits: 999.5360000000001 + creditsType: "sendLimit" + relay: + enabled: true + data: + userName: "john.smith@example.com" + relay: "smtp-relay.domain.com" + port: 587 + marketingAutomation: + key: "kzfr5xxxxxxttuyo1" + enabled: true + email: "john.smith@example.com" + firstName: "John" + lastName: "Smith" + companyName: "MyShop" + address: + city: "New-York" + street: "1677B 8th Avenue" + zipCode: "7665" + country: "USA" + schema: + $ref: "#/definitions/getAccount" + /processes: + get: + tags: + - "Process" + summary: "Return all the processes for your account" + operationId: "getProcesses" + parameters: + - name: "limit" + in: "query" + description: "Number limitation for the result returned" + required: false + type: "integer" + default: 10 + maximum: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Beginning point in the list to retrieve from." + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation. Default order is **descending** if `sort` is not passed" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "processes informations" + examples: + application/json: + processes: + - id: 40 + status: "completed" + name: "TRANS-CALC" + - id: 43 + status: "queued" + name: "TRANS-GLOBAL-CALC" + - id: 194 + status: "completed" + name: "SEARCH_EXPORT_USERS" + export_url: "filename.csv" + count: 3 + schema: + $ref: "#/definitions/getProcesses" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /processes/{processId}: + get: + tags: + - "Process" + summary: "Return the informations for a process" + operationId: "getProcess" + parameters: + - name: "processId" + in: "path" + description: "Id of the process" + required: true + type: "integer" + format: "int64" + x-exportParamName: "ProcessId" + responses: + "200": + description: "process informations" + examples: + application/json: + id: 194 + status: "completed" + name: "SEARCH_EXPORT_USERS" + export_url: "filename.csv" + schema: + $ref: "#/definitions/getProcess" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Process ID not found" + examples: + application/json: + code: "invalid_parameter" + message: "processId is invalid" + schema: + $ref: "#/definitions/errorModel" + /inbound/events: + get: + tags: + - "Inbound Parsing" + summary: "Get the list of all the events for the received emails." + description: "This endpoint will show the list of all the events for the received\ + \ emails." + operationId: "getInboundEmailEvents" + parameters: + - name: "sender" + in: "query" + description: "Email address of the sender." + required: false + type: "string" + x-exportParamName: "Sender" + x-optionalDataType: "String" + - name: "startDate" + in: "query" + description: "Mandatory if endDate is used. Starting date (YYYY-MM-DD) from\ + \ which you want to fetch the list. Maximum time period that can be selected\ + \ is one month." + required: false + type: "string" + format: "date" + x-exportParamName: "StartDate" + x-optionalDataType: "String" + - name: "endDate" + in: "query" + description: "Mandatory if startDate is used. Ending date (YYYY-MM-DD) till\ + \ which you want to fetch the list. Maximum time period that can be selected\ + \ is one month." + required: false + type: "string" + format: "date" + x-exportParamName: "EndDate" + x-optionalDataType: "String" + - name: "limit" + in: "query" + description: "Number of documents returned per page" + required: false + type: "integer" + default: 100 + maximum: 500 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "offset" + in: "query" + description: "Index of the first document on the page" + required: false + type: "integer" + default: 0 + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order of record\ + \ creation" + required: false + type: "string" + default: "desc" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "List of events for received emails." + examples: + application/json: + events: + - uuid: "1a825d56-029b-4a41-b8e4-1a825d56" + date: "2017-03-11T12:30:00.000Z" + sender: "john@example.com" + recipient: "alexa@example.com" + - uuid: "1a825d56-029b-4a41-b8e4-61670463431b" + date: "2017-03-12T12:30:00.000Z" + sender: "alice@example.com" + recipient: "bob@example.com" + schema: + $ref: "#/definitions/getInboundEmailEvents" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /inbound/events/{uuid}: + get: + tags: + - "Inbound Parsing" + summary: "Fetch all events history for one particular received email." + description: "This endpoint will show the list of all events history for one\ + \ particular received email." + operationId: "getInboundEmailEventsByUuid" + parameters: + - name: "uuid" + in: "path" + description: "UUID to fetch events specific to recieved email" + required: true + type: "string" + x-exportParamName: "Uuid" + responses: + "200": + description: "List of events for a particular received email on the basis\ + \ of uuid." + examples: + application/json: + receivedAt: "2017-03-12T12:30:00.000Z" + deliveredAt: "2017-03-12T12:31:00.000Z" + sender: "alice@example.com" + recipient: "bob@example.com" + messageId: "" + subject: "Re: Question about your API" + attachments: + - name: "invoice.pdf" + contentType: "application/pdf" + contentLength: 12345 + logs: + - date: "2017-03-12T12:30:00.000Z" + type: "received" + - date: "2017-03-12T12:30:04.000Z" + type: "webhookFailed" + - date: "2017-03-12T12:31:04.000Z" + type: "webhookDelivered" + schema: + $ref: "#/definitions/getInboundEmailEventsByUuid" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /corporate/subAccount: + get: + tags: + - "Master account" + summary: "Get the list of all the sub-accounts of the master account." + description: "This endpoint will provide the list all the sub-accounts of the\ + \ master account." + parameters: + - name: "offset" + in: "query" + description: "Index of the first sub-account in the page" + required: true + type: "integer" + x-exportParamName: "Offset" + - name: "limit" + in: "query" + description: "Number of sub-accounts to be displayed on each page" + required: true + type: "integer" + x-exportParamName: "Limit" + responses: + "200": + description: "Sub-accounts list" + examples: + application/json: + count: 3 + subAccounts: + - id: 4043629 + companyName: "Company1" + active: true + createdAt: 1629439311 + - id: 3984002 + companyName: "Company2" + active: true + createdAt: 1629439311 + - id: 3524191 + companyName: "Company3" + active: true + createdAt: 1614713641 + schema: + $ref: "#/definitions/subAccountsResponse" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Master account" + summary: "Create a new sub-account under a master account." + description: "This endpoint will create a new sub-account under a master account" + parameters: + - in: "body" + name: "subAccountCreate" + description: "values to create new sub-account" + required: true + schema: + $ref: "#/definitions/createSubAccount" + x-exportParamName: "SubAccountCreate" + responses: + "201": + description: "Created sub-account ID" + examples: + application/json: + id: 8767868 + schema: + $ref: "#/definitions/createSubAccountResponse" + "400": + description: "Bad request" + examples: + application/json: + code: "missing_parameter" + message: "Missing companyName attribute in the request" + schema: + $ref: "#/definitions/errorModel" + /corporate/subAccount/{id}: + get: + tags: + - "Master account" + summary: "Get sub-account details" + description: "This endpoint will provide the details for the specified sub-account\ + \ company" + parameters: + - name: "id" + in: "path" + description: "Id of the sub-account organization" + required: true + type: "integer" + format: "int64" + x-exportParamName: "Id" + responses: + "200": + description: "Sub-account organization details" + examples: + application/json: + name: "Uday Pandit" + email: "uday+1@sendinblue.com" + companyName: "API-Sub-26thOct21-4" + planInfo: + credits: + sms: 1234 + emails: + quantity: 2000 + remaining: 1955 + features: + inbox: + quantity: 20 + remaining: 12 + landingPage: + quantity: 25 + remaining: 14 + users: + quantity: 30 + remaining: 14 + planType: "paid" + schema: + $ref: "#/definitions/subAccountDetailsResponse" + delete: + tags: + - "Master account" + summary: "Delete a sub-account" + parameters: + - name: "id" + in: "path" + description: "Id of the sub-account organization to be deleted" + required: true + type: "integer" + format: "int64" + x-exportParamName: "Id" + responses: + "204": + description: "Returned when sub-account is deleted succesfully" + "400": + description: "bad request" + examples: + application/json: + message: "Sub-account 2039dfsddf885 is not valid" + code: "missing_parameter" + "404": + description: "Organization not found" + examples: + application/json: + message: "Sub-account 2039885 was not found" + code: "document_not_found" + /corporate/subAccount/{id}/plan: + put: + tags: + - "Master account" + summary: "Update sub-account plan" + description: "This endpoint will update the sub-account plan" + parameters: + - name: "id" + in: "path" + description: "Id of the sub-account organization" + required: true + type: "integer" + format: "int64" + x-exportParamName: "Id" + - in: "body" + name: "updatePlanDetails" + description: "Values to update a sub-account plan" + required: true + schema: + $ref: "#/definitions/subAccountUpdatePlanRequest" + x-exportParamName: "UpdatePlanDetails" + responses: + "204": + description: "Sub account plan updated" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a master account" + examples: + application/json: + code: "permission_denied" + message: "Access forbidden." + schema: + $ref: "#/definitions/errorModel" + /corporate/subAccount/ssoToken: + post: + tags: + - "Master account" + summary: "Generate SSO token to access Sendinblue" + description: "This endpoint generates an sso token to authenticate and access\ + \ a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token],\ + \ where [token] will be replaced by the actual token." + parameters: + - in: "body" + name: "ssoTokenRequest" + description: "Values to generate SSO token for sub-account" + required: true + schema: + $ref: "#/definitions/ssoTokenRequest" + x-exportParamName: "SsoTokenRequest" + responses: + "200": + description: "Session token" + examples: + application/json: + token: "5cadaxxxxxxxxxxxxxxxxxxxx5a179f85a0" + schema: + $ref: "#/definitions/getSsoToken" + "400": + description: "bad request" + examples: + application/json: + code: "invalid_parameter" + message: "Invalid sub-account id." + schema: + $ref: "#/definitions/errorModel" + "403": + description: "Current account is not a master account" + examples: + application/json: + code: "permission_denied" + message: "Access forbidden." + schema: + $ref: "#/definitions/errorModel" + /corporate/masterAccount: + get: + tags: + - "Master account" + summary: "Get the details of requested master account" + description: "This endpoint will provide the details of the master account." + parameters: [] + responses: + "200": + description: "Master account details" + examples: + application/json: + email: "sample@example.com" + companyName: "Corp Sample 1-1" + id: 1003286 + currencyCode: "INR" + timezone: "Europe/Paris" + billingInfo: + email: "sample@example.com" + companyName: "Corp Sample 1-1" + name: + givenName: "Uday" + familyName: "Pandit" + address: + streetAddress: "C-92" + locality: "Pandav Nagar, New Delhi" + postalCode: "560048" + stateCode: "UP" + countryCode: "IN" + planInfo: + currencyCode: "INR" + nextBillingAt: 1637739295 + price: 2100 + planPeriod: "month" + subAccounts: 15 + features: + - name: "MULTI_USER" + unitValue: 1 + quantity: 10 + used: 15 + remaining: 0 + - name: "ADVANCED_REPORTING" + unitValue: 1 + quantity: 12 + used: 1 + remaining: 11 + - name: "INBOX" + unitValue: 1 + quantity: 10 + used: 10 + remaining: 0 + - name: "LANDING_PAGE" + unitValue: 5 + quantity: 10 + used: 11 + remaining: 0 + - name: "RECURRING_CREDITS" + unitValue: 1 + quantity: 500 + used: 1 + remaining: 499 + schema: + $ref: "#/definitions/masterDetailsResponse" + "400": + description: "bad request" + schema: + $ref: "#/definitions/errorModel" + /crm/pipeline/details: + get: + tags: + - "Deals" + summary: "Get pipeline stages" + parameters: [] + responses: + "200": + description: "Returns list of pipeline stages" + schema: + $ref: "#/definitions/Pipeline" + /crm/attributes/deals: + get: + tags: + - "Deals" + summary: "Get deal attributes" + parameters: [] + responses: + "200": + description: "Returns list of deal attributes" + schema: + $ref: "#/definitions/DealAttributes" + /crm/deals: + get: + tags: + - "Deals" + summary: "Get all deals" + parameters: + - name: "filter[attributes]" + in: "query" + description: "Filter by attrbutes. If you have filter for owner on your side\ + \ please send it as `attributes.owner`.\"" + required: false + type: "string" + x-exportParamName: "FilterAttributes" + x-optionalDataType: "String" + - name: "filter[linkedCompaniesIds]" + in: "query" + description: "Filter by linked companies ids" + required: false + type: "string" + x-exportParamName: "FilterLinkedCompaniesIds" + x-optionalDataType: "String" + - name: "filter[linkedContactsIds]" + in: "query" + description: "Filter by linked companies ids" + required: false + type: "string" + x-exportParamName: "FilterLinkedContactsIds" + x-optionalDataType: "String" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order. Default\ + \ order is **descending** by creation if `sort` is not passed" + required: false + type: "string" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "sortBy" + in: "query" + description: "The field used to sort field names." + required: false + type: "string" + x-exportParamName: "SortBy" + x-optionalDataType: "String" + responses: + "200": + description: "Returns deals list with filters" + schema: + $ref: "#/definitions/DealsList" + "400": + description: "Returned when query params are invalid" + examples: + response: + value: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Deals" + summary: "Create a deal" + parameters: + - in: "body" + name: "body" + description: "Deal create data." + required: true + schema: + $ref: "#/definitions/body" + x-exportParamName: "Body" + responses: + "201": + description: "Created new Deal" + schema: + $ref: "#/definitions/inline_response_201" + "400": + description: "Returned when invalid data posted" + /crm/deals/{id}: + get: + tags: + - "Deals" + summary: "Get a deal" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "200": + description: "Returns the deal by id" + schema: + $ref: "#/definitions/Deal" + "400": + description: "Returned when task id is invalid" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when item not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Deals" + summary: "Delete a deal" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "204": + description: "Returned when item deleted" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when deal id is not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + patch: + tags: + - "Deals" + summary: "Update a deal" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + description: "Updated deal details." + required: true + schema: + $ref: "#/definitions/body_1" + x-exportParamName: "Body" + responses: + "204": + description: "Deal updated successfully" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when deal id is not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + /companies: + get: + tags: + - "Companies" + summary: "Get all companies" + parameters: + - name: "filters" + in: "query" + description: "Filter by attrbutes. If you have filter for owner on your side\ + \ please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"}" + required: false + type: "string" + x-exportParamName: "Filters" + x-optionalDataType: "String" + - name: "linkedContactsIds" + in: "query" + description: "Filter by linked contacts ids" + required: false + type: "integer" + format: "int64" + x-exportParamName: "LinkedContactsIds" + x-optionalDataType: "Int64" + - name: "linkedDealsIds" + in: "query" + description: "Filter by linked deals ids" + required: false + type: "string" + format: "objectID" + x-exportParamName: "LinkedDealsIds" + x-optionalDataType: "String" + - name: "page" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Page" + x-optionalDataType: "Int64" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order. Default\ + \ order is **descending** by creation if `sort` is not passed" + required: false + type: "string" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "sortBy" + in: "query" + description: "The field used to sort field names." + required: false + type: "string" + x-exportParamName: "SortBy" + x-optionalDataType: "String" + responses: + "200": + description: "Returns companies list with filters" + schema: + $ref: "#/definitions/CompaniesList" + "400": + description: "Returned when query params are invalid" + examples: + response: + value: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "Companies" + summary: "Create a company" + parameters: + - in: "body" + name: "body" + description: "Company create data." + required: true + schema: + $ref: "#/definitions/body_2" + x-exportParamName: "Body" + responses: + "200": + description: "Created new company" + schema: + $ref: "#/definitions/inline_response_200" + "400": + description: "Returned when invalid data posted" + /companies/{id}: + get: + tags: + - "Companies" + summary: "Get a company" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "200": + description: "Returns the company by id" + schema: + $ref: "#/definitions/Company" + "400": + description: "Returned when company id is invalid" + examples: + application/json: + message: "Route company id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when item not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "Companies" + summary: "Delete a company" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "204": + description: "Returned when item deleted" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route company id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when company id is not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + patch: + tags: + - "Companies" + summary: "Update a company" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + description: "Updated company details." + required: true + schema: + $ref: "#/definitions/body_3" + x-exportParamName: "Body" + responses: + "200": + description: "Company updated successfully" + schema: + $ref: "#/definitions/Company" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route company id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when company id is not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + /companies/attributes: + get: + tags: + - "Companies" + summary: "Get company attributes" + parameters: [] + responses: + "200": + description: "Returns list of company attributes" + schema: + $ref: "#/definitions/CompanyAttributes" + /companies/link-unlink/{id}: + patch: + tags: + - "Companies" + summary: "Link and Unlink company with contacts and deals" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + description: "Linked / Unlinked contacts and deals ids." + required: true + schema: + $ref: "#/definitions/body_4" + x-exportParamName: "Body" + responses: + "204": + description: "Returns list of company attributes" + "400": + description: "Returned when query params are invalid" + examples: + response: + value: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + /crm/tasktypes: + get: + tags: + - "CRM" + summary: "Get all task types" + parameters: [] + responses: + "200": + description: "Returns all the Task types" + schema: + $ref: "#/definitions/TaskTypes" + /crm/tasks: + get: + tags: + - "CRM" + summary: "Get all tasks" + parameters: + - name: "filter[type]" + in: "query" + description: "Filter by task type (ID)" + required: false + type: "string" + x-exportParamName: "FilterType" + x-optionalDataType: "String" + - name: "filter[status]" + in: "query" + description: "Filter by task status" + required: false + type: "string" + enum: + - "done" + - "undone" + x-exportParamName: "FilterStatus" + x-optionalDataType: "String" + - name: "filter[date]" + in: "query" + description: "Filter by date" + required: false + type: "string" + enum: + - "overdue" + - "today" + - "tomorrow" + - "week" + - "range" + x-exportParamName: "FilterDate" + x-optionalDataType: "String" + - name: "filter[assignTo]" + in: "query" + description: "Filter by assignTo id" + required: false + type: "string" + x-exportParamName: "FilterAssignTo" + x-optionalDataType: "String" + - name: "filter[contacts]" + in: "query" + description: "Filter by contact ids" + required: false + type: "string" + x-exportParamName: "FilterContacts" + x-optionalDataType: "String" + - name: "filter[deals]" + in: "query" + description: "Filter by deals ids" + required: false + type: "string" + x-exportParamName: "FilterDeals" + x-optionalDataType: "String" + - name: "filter[companies]" + in: "query" + description: "Filter by companies ids" + required: false + type: "string" + x-exportParamName: "FilterCompanies" + x-optionalDataType: "String" + - name: "dateFrom" + in: "query" + description: "dateFrom to date range filter type (timestamp in milliseconds)" + required: false + type: "integer" + x-exportParamName: "DateFrom" + x-optionalDataType: "Int32" + - name: "dateTo" + in: "query" + description: "dateTo to date range filter type (timestamp in milliseconds)" + required: false + type: "integer" + x-exportParamName: "DateTo" + x-optionalDataType: "Int32" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order. Default\ + \ order is **descending** by creation if `sort` is not passed" + required: false + type: "string" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + - name: "sortBy" + in: "query" + description: "The field used to sort field names." + required: false + type: "string" + x-exportParamName: "SortBy" + x-optionalDataType: "String" + responses: + "200": + description: "Returns task list with filters" + schema: + $ref: "#/definitions/TaskList" + "400": + description: "Returned when query params are invalid" + examples: + response: + value: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "CRM" + summary: "Create a task" + parameters: + - in: "body" + name: "body" + description: "Task name." + required: true + schema: + $ref: "#/definitions/body_5" + x-exportParamName: "Body" + responses: + "201": + description: "Created new task" + schema: + $ref: "#/definitions/inline_response_201_1" + "400": + description: "Returned when invalid data posted" + /crm/tasks/{id}: + get: + tags: + - "CRM" + summary: "Get a task" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "200": + description: "Returns the Task by id" + schema: + $ref: "#/definitions/Task" + "400": + description: "Returned when task id is invalid" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when item not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "CRM" + summary: "Delete a task" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "204": + description: "Returned when item deleted" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when task id is not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + patch: + tags: + - "CRM" + summary: "Update a task" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + description: "Updated task details." + required: true + schema: + $ref: "#/definitions/body_6" + x-exportParamName: "Body" + responses: + "204": + description: "Task updated successfully" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when task id is not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + /crm/notes: + get: + tags: + - "CRM" + summary: "Get all notes" + parameters: + - name: "entity" + in: "query" + description: "Filter by note entity type" + required: false + type: "string" + enum: + - "companies" + - "deals" + - "contacts" + x-exportParamName: "Entity" + x-optionalDataType: "String" + - name: "entityIds" + in: "query" + description: "Filter by note entity IDs" + required: false + type: "string" + x-exportParamName: "EntityIds" + x-optionalDataType: "String" + - name: "dateFrom" + in: "query" + description: "dateFrom to date range filter type (timestamp in milliseconds)" + required: false + type: "integer" + x-exportParamName: "DateFrom" + x-optionalDataType: "Int32" + - name: "dateTo" + in: "query" + description: "dateTo to date range filter type (timestamp in milliseconds)" + required: false + type: "integer" + x-exportParamName: "DateTo" + x-optionalDataType: "Int32" + - name: "offset" + in: "query" + description: "Index of the first document of the page" + required: false + type: "integer" + format: "int64" + x-exportParamName: "Offset" + x-optionalDataType: "Int64" + - name: "limit" + in: "query" + description: "Number of documents per page" + required: false + type: "integer" + default: 50 + format: "int64" + x-exportParamName: "Limit" + x-optionalDataType: "Int64" + - name: "sort" + in: "query" + description: "Sort the results in the ascending/descending order. Default\ + \ order is **descending** by creation if `sort` is not passed" + required: false + type: "string" + enum: + - "asc" + - "desc" + x-exportParamName: "Sort" + x-optionalDataType: "String" + responses: + "200": + description: "Returns notes list with filters" + schema: + $ref: "#/definitions/NoteList" + "400": + description: "Returned when query params are invalid" + examples: + response: + value: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + post: + tags: + - "CRM" + summary: "Create a note" + parameters: + - in: "body" + name: "body" + description: "Note data to create a note." + required: true + schema: + $ref: "#/definitions/NoteData" + x-exportParamName: "Body" + responses: + "200": + description: "Created new note" + schema: + $ref: "#/definitions/NoteId" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + "415": + description: "Format is not supported" + examples: + application/json: + message: "The format not supported for deserialization." + schema: + $ref: "#/definitions/errorModel" + /crm/notes/{id}: + get: + tags: + - "CRM" + summary: "Get a note" + parameters: + - name: "id" + in: "path" + description: "Note ID to get" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "200": + description: "Returns the Note by id" + schema: + $ref: "#/definitions/Note" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when item not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + delete: + tags: + - "CRM" + summary: "Delete a note" + parameters: + - name: "id" + in: "path" + description: "Note ID to delete" + required: true + type: "string" + x-exportParamName: "Id" + responses: + "204": + description: "Returned when item deleted" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Route attribute id is not valid." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when item not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + patch: + tags: + - "CRM" + summary: "Update a note" + parameters: + - name: "id" + in: "path" + description: "Note ID to update" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + description: "Note data to update a note" + required: true + schema: + $ref: "#/definitions/NoteData" + x-exportParamName: "Body" + responses: + "204": + description: "Note updated successfully" + "400": + description: "Returned when invalid data posted" + examples: + application/json: + message: "Not valid data." + schema: + $ref: "#/definitions/errorModel" + "404": + description: "Returned when item not found" + examples: + application/json: + message: "Document not found" + schema: + $ref: "#/definitions/errorModel" + "415": + description: "Format is not supported" + examples: + application/json: + message: "The format not supported for deserialization." + schema: + $ref: "#/definitions/errorModel" +securityDefinitions: + api-key: + description: "The API key should be passed in the request headers as `api-key`\ + \ for authentication." + type: "apiKey" + name: "api-key" + in: "header" + partner-key: + description: "The partner key should be passed in the request headers as `partner-key`\ + \ along with `api-key` pair for successful authentication of partner (Optional)." + type: "apiKey" + name: "partner-key" + in: "header" +definitions: + getAccount: + allOf: + - $ref: "#/definitions/getExtendedClient" + - type: "object" + required: + - "plan" + - "relay" + properties: + plan: + type: "array" + description: "Information about your plans and credits" + items: + $ref: "#/definitions/getAccount_plan" + relay: + $ref: "#/definitions/getAccount_relay" + marketingAutomation: + $ref: "#/definitions/getAccount_marketingAutomation" + getChildrenList: + type: "object" + properties: + children: + type: "array" + description: "Your children's account information" + items: + type: "object" + allOf: + - $ref: "#/definitions/getChildInfo" + - type: "object" + properties: + id: + type: "integer" + format: "int64" + example: 187588 + description: "ID of the child" + count: + type: "integer" + format: "int64" + example: 24 + description: "Number of child accounts" + getChildInfo: + allOf: + - $ref: "#/definitions/getClient" + - type: "object" + required: + - "password" + properties: + credits: + $ref: "#/definitions/getChildInfo_credits" + statistics: + $ref: "#/definitions/getChildInfo_statistics" + password: + type: "string" + format: "password" + example: "abC01De2fGHI3jkL" + description: "The encrypted password of child account" + ips: + type: "array" + description: "IP(s) associated to a child account user" + items: + type: "string" + example: "" + description: "IP(s) associated to the user" + apiKeys: + $ref: "#/definitions/getChildInfo_apiKeys" + getChildAccountCreationStatus: + type: "object" + required: + - "childAccountCreated" + properties: + childAccountCreated: + type: "boolean" + example: true + description: "Status of child account creation whether it is successfully\ + \ created (exists) or not." + getChildDomains: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getChildDomain" + getSsoToken: + type: "object" + required: + - "token" + properties: + token: + type: "string" + example: "ede520dxxxxxxxxxxxx76d631fba2" + description: "Session token, it will remain valid for 15 days." + getChildDomain: + type: "object" + properties: + domain: + type: "string" + example: "mycustomdomain.com" + description: "Sender domain" + active: + type: "boolean" + example: true + description: "indicates whether a domain is verified or not" + getClient: + type: "object" + required: + - "companyName" + - "email" + - "firstName" + - "lastName" + properties: + email: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Login Email" + firstName: + type: "string" + example: "John" + description: "First Name" + lastName: + type: "string" + example: "Smith" + description: "Last Name" + companyName: + type: "string" + example: "MyCompany" + description: "Name of the company" + getExtendedClient: + allOf: + - $ref: "#/definitions/getClient" + - type: "object" + required: + - "address" + properties: + address: + $ref: "#/definitions/getExtendedClient_address" + getSendersList: + type: "object" + properties: + senders: + type: "array" + description: "List of the senders available in your account" + items: + $ref: "#/definitions/getSendersList_senders" + createChild: + type: "object" + required: + - "companyName" + - "email" + - "firstName" + - "lastName" + - "password" + properties: + email: + type: "string" + format: "email" + example: "josh.cruise@example.com" + description: "Email address to create the child account" + firstName: + type: "string" + example: "Josh" + description: "First name to use to create the child account" + lastName: + type: "string" + example: "Cruise" + description: "Last name to use to create the child account" + companyName: + type: "string" + example: "Your Company" + description: "Company name to use to create the child account" + password: + type: "string" + format: "password" + example: "Pa55w0rd65" + description: "Password for the child account to login" + language: + type: "string" + example: "en" + description: "Language of the child account" + enum: + - "fr" + - "es" + - "pt" + - "it" + - "de" + - "en" + createSender: + type: "object" + required: + - "email" + - "name" + properties: + name: + type: "string" + example: "Newsletter" + description: "From Name to use for the sender" + email: + type: "string" + format: "email" + example: "newsletter@mycompany.com" + description: "From email to use for the sender. A verification email will\ + \ be sent to this address." + ips: + type: "array" + description: "Mandatory in case of dedicated IP, IPs to associate to the sender" + items: + $ref: "#/definitions/createSender_ips" + updateSender: + type: "object" + properties: + name: + type: "string" + example: "Newsletter" + description: "From Name to update the sender" + email: + type: "string" + format: "email" + example: "newsletter@mycompany.com" + description: "From Email to update the sender" + ips: + type: "array" + description: "Only in case of dedicated IP, IPs to associate to the sender.\ + \ If passed, will replace all the existing IPs." + items: + $ref: "#/definitions/createSender_ips" + updateChild: + type: "object" + properties: + email: + type: "string" + format: "email" + example: "josh.cruise@example.com" + description: "New Email address to update the child account" + firstName: + type: "string" + example: "Josh" + description: "New First name to use to update the child account" + lastName: + type: "string" + example: "Cruise" + description: "New Last name to use to update the child account" + companyName: + type: "string" + example: "Your Company" + description: "New Company name to use to update the child account" + password: + type: "string" + format: "password" + example: "Pa55w0rd65" + description: "New password for the child account to login" + updateChildAccountStatus: + type: "object" + properties: + transactionalEmail: + type: "boolean" + example: false + description: "Status of Transactional Email Platform activation for your account\ + \ (true=enabled, false=disabled)" + transactionalSms: + type: "boolean" + example: false + description: "Status of Transactional SMS Platform activation for your account\ + \ (true=enabled, false=disabled)" + marketingAutomation: + type: "boolean" + example: true + description: "Status of Marketing Automation Platform activation for your\ + \ account (true=enabled, false=disabled)" + smsCampaign: + type: "boolean" + example: true + description: "Status of SMS Campaign Platform activation for your account\ + \ (true=enabled, false=disabled)" + errorModel: + type: "object" + required: + - "code" + - "message" + properties: + code: + type: "string" + example: "method_not_allowed" + description: "Error code displayed in case of a failure" + enum: + - "invalid_parameter" + - "missing_parameter" + - "out_of_range" + - "campaign_processing" + - "campaign_sent" + - "document_not_found" + - "reseller_permission_denied" + - "not_enough_credits" + - "permission_denied" + - "duplicate_parameter" + - "duplicate_request" + - "method_not_allowed" + - "unauthorized" + - "account_under_validation" + - "not_acceptable" + message: + type: "string" + example: "POST Method is not allowed on this path" + description: "Readable message associated to the failure" + remainingCreditModel: + type: "object" + required: + - "child" + - "reseller" + properties: + child: + $ref: "#/definitions/remainingCreditModel_child" + reseller: + $ref: "#/definitions/remainingCreditModel_reseller" + addCredits: + type: "object" + properties: + sms: + type: "integer" + format: "int64" + example: 450 + description: "Required if email credits are empty. SMS credits to be added\ + \ to the child account" + email: + type: "integer" + format: "int64" + example: 1200 + description: "Required if sms credits are empty. Email credits to be added\ + \ to the child account" + removeCredits: + type: "object" + properties: + sms: + type: "integer" + format: "int64" + example: 300 + description: "Required if email credits are empty. SMS credits to be removed\ + \ from the child account" + email: + type: "integer" + format: "int64" + example: 500 + description: "Required if sms credits are empty. Email credits to be removed\ + \ from the child account" + addChildDomain: + type: "object" + properties: + domain: + type: "string" + example: "mychilddomain.com" + description: "Sender domain to add for a specific child account" + updateChildDomain: + type: "object" + properties: + domain: + type: "string" + example: "myupdateddomain.com" + description: "Value for the sender domain that will replace the existing domain" + getProcesses: + type: "object" + properties: + processes: + type: "array" + description: "List of processes available on your account" + items: + $ref: "#/definitions/getProcess" + count: + type: "integer" + format: "int64" + example: 5 + description: "Number of processes available on your account" + getProcess: + type: "object" + required: + - "id" + - "name" + - "status" + properties: + id: + type: "integer" + format: "int64" + example: 145 + description: "Id of the process" + status: + type: "string" + example: "queued" + description: "Status of the process" + enum: + - "queued" + - "in_process" + - "completed" + name: + type: "string" + example: "IMPORTUSER" + description: "Process name" + export_url: + type: "string" + example: "http://requestb.in/16ua3aj1" + description: "URL on which send export the of contacts once the process is\ + \ completed" + getEmailCampaigns: + type: "object" + properties: + campaigns: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getExtendedCampaignOverview" + - type: "object" + properties: + recipients: + type: "object" + allOf: + - $ref: "#/definitions/getCampaignRecipients" + statistics: + type: "object" + allOf: + - $ref: "#/definitions/getExtendedCampaignStats" + shareLink: + type: "string" + format: "url" + example: "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900" + description: "Link to share the campaign on social medias" + required: + - "recipients" + - "statistics" + count: + type: "integer" + format: "int64" + example: 24 + description: "Number of Email campaigns retrieved" + getSmsCampaigns: + type: "object" + properties: + campaigns: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getSmsCampaignOverview" + - type: "object" + properties: + recipients: + type: "object" + allOf: + - $ref: "#/definitions/getCampaignRecipients" + statistics: + type: "object" + allOf: + - $ref: "#/definitions/getSmsCampaignStats" + required: + - "recipients" + - "statistics" + count: + type: "integer" + format: "int64" + example: 12 + description: "Number of SMS campaigns retrieved" + getSmsCampaign: + allOf: + - $ref: "#/definitions/getSmsCampaignOverview" + - type: "object" + required: + - "recipients" + - "statistics" + properties: + recipients: + type: "object" + allOf: + - $ref: "#/definitions/getCampaignRecipients" + statistics: + type: "object" + allOf: + - $ref: "#/definitions/getSmsCampaignStats" + getEmailCampaign: + allOf: + - $ref: "#/definitions/getExtendedCampaignOverview" + - type: "object" + required: + - "recipients" + - "statistics" + properties: + recipients: + type: "object" + allOf: + - $ref: "#/definitions/getCampaignRecipients" + statistics: + type: "object" + allOf: + - $ref: "#/definitions/getExtendedCampaignStats" + getCampaignOverview: + type: "object" + required: + - "id" + - "name" + - "status" + - "type" + properties: + id: + type: "integer" + format: "int64" + example: 12 + description: "ID of the campaign" + name: + type: "string" + example: "EN - Sales Summer 2017" + description: "Name of the campaign" + subject: + type: "string" + example: "20% OFF for 2017 Summer Sales" + description: "Subject of the campaign. Only available if `abTesting` flag\ + \ of the campaign is `false`" + type: + type: "string" + example: "classic" + description: "Type of campaign" + enum: + - "classic" + - "trigger" + status: + type: "string" + example: "sent" + description: "Status of the campaign" + enum: + - "draft" + - "sent" + - "archive" + - "queued" + - "suspended" + - "in_process" + scheduledAt: + type: "string" + example: "2017-06-01T12:30:00Z" + description: "UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ)" + abTesting: + type: "boolean" + example: true + description: "Status of A/B Test for the campaign. abTesting = false means\ + \ it is disabled, & abTesting = true means it is enabled." + subjectA: + type: "string" + example: "Discover the New Collection!" + description: "Subject A of the ab-test campaign. Only available if `abTesting`\ + \ flag of the campaign is `true`" + subjectB: + type: "string" + example: "Want to discover the New Collection?" + description: "Subject B of the ab-test campaign. Only available if `abTesting`\ + \ flag of the campaign is `true`" + splitRule: + type: "integer" + example: 25 + description: "The size of your ab-test groups. Only available if `abTesting`\ + \ flag of the campaign is `true`" + winnerCriteria: + type: "string" + example: "open" + description: "Criteria for the winning version. Only available if `abTesting`\ + \ flag of the campaign is `true`" + winnerDelay: + type: "integer" + example: 50 + description: "The duration of the test in hours at the end of which the winning\ + \ version will be sent. Only available if `abTesting` flag of the campaign\ + \ is `true`" + sendAtBestTime: + type: "boolean" + example: true + description: "It is true if you have chosen to send your campaign at best\ + \ time, otherwise it is false" + getExtendedCampaignOverview: + allOf: + - $ref: "#/definitions/getCampaignOverview" + - type: "object" + required: + - "createdAt" + - "footer" + - "header" + - "htmlContent" + - "modifiedAt" + - "replyTo" + - "sender" + - "testSent" + properties: + testSent: + type: "boolean" + example: true + description: "Retrieved the status of test email sending. (true=Test email\ + \ has been sent false=Test email has not been sent)" + header: + type: "string" + example: "[DEFAULT_HEADER]" + description: "Header of the campaign" + footer: + type: "string" + example: "[DEFAULT_FOOTER]" + description: "Footer of the campaign" + sender: + $ref: "#/definitions/getExtendedCampaignOverview_sender" + replyTo: + type: "string" + format: "email" + example: "replyto@domain.com" + description: "Email defined as the \"Reply to\" of the campaign" + toField: + type: "string" + example: "{FNAME} {LNAME}" + description: "Customisation of the \"to\" field of the campaign" + htmlContent: + type: "string" + example: "This is my HTML Content" + description: "HTML content of the campaign" + shareLink: + type: "string" + format: "url" + example: "http://dhh.sendinblue.com/fhsgccc.html?t=9865448900" + description: "Link to share the campaign on social medias" + tag: + type: "string" + example: "Newsletter" + description: "Tag of the campaign" + createdAt: + type: "string" + example: "2017-05-01T12:30:00Z" + description: "Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" + modifiedAt: + type: "string" + example: "2017-05-01T12:30:00Z" + description: "UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" + inlineImageActivation: + type: "boolean" + example: true + description: "Status of inline image. inlineImageActivation = false means\ + \ image can’t be embedded, & inlineImageActivation = true means image\ + \ can be embedded, in the email." + mirrorActive: + type: "boolean" + example: true + description: "Status of mirror links in campaign. mirrorActive = false means\ + \ mirror links are deactivated, & mirrorActive = true means mirror links\ + \ are activated, in the campaign" + recurring: + type: "boolean" + example: true + description: "FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false\ + \ means contact can receive the same Trigger campaign only once, & recurring\ + \ = true means contact can receive the same Trigger campaign several times" + sentDate: + type: "string" + example: "2018-12-01T16:30:00Z" + description: "Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ).\ + \ Only available if 'status' of the campaign is 'sent'" + returnBounce: + type: "integer" + format: "int64" + example: 5 + description: "Total number of non-delivered campaigns for a particular campaign\ + \ id." + getCampaignRecipients: + type: "object" + required: + - "exclusionLists" + - "lists" + properties: + lists: + type: "array" + items: + type: "integer" + format: "int64" + example: 21 + description: "List IDs included in the campaign" + exclusionLists: + type: "array" + items: + type: "integer" + format: "int64" + example: 13 + description: "List IDs excluded of the campaign" + getExtendedCampaignStats: + type: "object" + required: + - "campaignStats" + - "globalStats" + - "linksStats" + - "mirrorClick" + - "remaining" + - "statsByBrowser" + - "statsByDevice" + - "statsByDomain" + properties: + globalStats: + type: "object" + description: "Overall statistics of the campaign" + allOf: + - $ref: "#/definitions/getCampaignStats" + campaignStats: + type: "array" + description: "List-wise statistics of the campaign." + items: + type: "object" + allOf: + - $ref: "#/definitions/getCampaignStats" + mirrorClick: + type: "integer" + format: "int64" + example: 120 + description: "Number of clicks on mirror link" + remaining: + type: "integer" + format: "int64" + example: 1000 + description: "Number of remaning emails to send" + linksStats: + type: "object" + example: + example.abc.com: 7 + example.domain.com: 10 + description: "Statistics about the number of clicks for the links" + properties: {} + statsByDomain: + $ref: "#/definitions/getStatsByDomain" + statsByDevice: + description: "Statistics about the campaign on the basis of various devices" + $ref: "#/definitions/getStatsByDevice" + statsByBrowser: + description: "Statistics about the campaign on the basis of various browsers" + $ref: "#/definitions/getStatsByBrowser" + getStatsByDomain: + type: "object" + additionalProperties: + $ref: "#/definitions/getCampaignStats" + getStatsByDevice: + type: "object" + properties: + desktop: + type: "object" + description: "Statistics of the campaign on the basis of desktop devices" + additionalProperties: + $ref: "#/definitions/getDeviceBrowserStats" + mobile: + type: "object" + description: "Statistics of the campaign on the basis of mobile devices" + additionalProperties: + $ref: "#/definitions/getDeviceBrowserStats" + tablet: + type: "object" + description: "Statistics of the campaign on the basis of tablet devices" + additionalProperties: + $ref: "#/definitions/getDeviceBrowserStats" + unknown: + type: "object" + description: "Statistics of the campaign on the basis of unknown devices" + additionalProperties: + $ref: "#/definitions/getDeviceBrowserStats" + getStatsByBrowser: + type: "object" + additionalProperties: + $ref: "#/definitions/getDeviceBrowserStats" + addContactToList: + type: "object" + properties: + emails: + type: "array" + description: "Mandatory if IDs are not passed, ignored otherwise. Emails to\ + \ add to a list. You can pass a maximum of 150 emails for addition in one\ + \ request. If you need to add the emails in bulk, please prefer /contacts/import\ + \ api." + items: + type: "string" + format: "email" + example: "john.smith@contact.com" + description: "Emails addresses OR IDs of the contacts" + maxItems: 150 + minItems: 1 + ids: + type: "array" + description: "Mandatory if Emails are not passed, ignored otherwise. Emails\ + \ to add to a list. You can pass a maximum of 150 emails for addition in\ + \ one request. If you need to add the emails in bulk, please prefer /contacts/import\ + \ api." + items: + type: "integer" + format: "int64" + example: 121 + description: "IDs of the contacts" + maxItems: 150 + minItems: 1 + removeContactFromList: + type: "object" + properties: + emails: + type: "array" + description: "Required if 'all' is false. Emails to remove from a list. You\ + \ can pass a maximum of 150 emails for removal in one request." + items: + type: "string" + example: "john.smith@contact.com OR 151" + description: "Emails addresses OR IDs of the contacts" + maxItems: 150 + minItems: 1 + ids: + type: "array" + description: "Mandatory if Emails are not passed, ignored otherwise. Emails\ + \ to add to a list. You can pass a maximum of 150 emails for addition in\ + \ one request. If you need to add the emails in bulk, please prefer /contacts/import\ + \ api." + items: + type: "integer" + format: "int64" + example: 121 + description: "IDs of the contacts" + maxItems: 150 + minItems: 1 + all: + type: "boolean" + example: false + description: "Required if none of 'emails' or 'ids' are passed. Remove all\ + \ existing contacts from a list. A process will be created in this scenario.\ + \ You can fetch the process details to know about the progress" + getSmsCampaignOverview: + type: "object" + required: + - "content" + - "createdAt" + - "id" + - "modifiedAt" + - "name" + - "sender" + - "status" + properties: + id: + type: "integer" + format: "int64" + example: 2 + description: "ID of the SMS Campaign" + name: + type: "string" + example: "PROMO CODE" + description: "Name of the SMS Campaign" + status: + type: "string" + example: "draft" + description: "Status of the SMS Campaign" + enum: + - "draft" + - "sent" + - "archive" + - "queued" + - "suspended" + - "inProcess" + content: + type: "string" + example: "Visit our Store and get some discount !" + description: "Content of the SMS Campaign" + scheduledAt: + type: "string" + example: "2017-06-01T12:30:00Z" + description: "UTC date-time on which SMS campaign is scheduled. Should be\ + \ in YYYY-MM-DDTHH:mm:ss.SSSZ format" + sender: + type: "string" + example: "MyCompany" + description: "Sender of the SMS Campaign" + createdAt: + type: "string" + example: "2017-06-01T12:30:00Z" + description: "Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" + modifiedAt: + type: "string" + example: "2017-05-01T12:30:00Z" + description: "UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ)" + createModel: + type: "object" + required: + - "id" + properties: + id: + type: "integer" + format: "int64" + example: 122 + description: "ID of the object created" + example: + id: 122 + createUpdateContactModel: + properties: + id: + type: "integer" + format: "int64" + example: 122 + description: "ID of the contact when a new contact is created" + example: + id: 122 + updateBatchContactsModel: + properties: + successIds: + type: "array" + example: "1,2" + items: + type: "integer" + format: "int64" + description: "IDs which are successfully updated" + failureIds: + type: "array" + example: "3,4" + items: + type: "integer" + format: "int64" + description: "IDs which are not updated" + createSenderModel: + type: "object" + required: + - "id" + properties: + id: + type: "integer" + format: "int64" + example: 5 + description: "ID of the Sender created" + spfError: + type: "boolean" + example: true + description: "Status of SPF configuration for the sender (true = SPF not well\ + \ configured, false = SPF well configured)" + dkimError: + type: "boolean" + example: false + description: "Status of DKIM configuration for the sender (true = DKIM not\ + \ well configured, false = DKIM well configured)" + example: + dkimError: false + id: 5 + spfError: true + createSmtpEmail: + type: "object" + properties: + messageId: + type: "string" + example: "<201798300811.5787683@relay.domain.com>" + description: "Message ID of the transactional email sent" + messageIds: + type: "array" + items: + type: "string" + example: "" + description: "version wise message ID's of the transactional emails sent" + example: + messageIds: + - "" + - "" + messageId: "<201798300811.5787683@relay.domain.com>" + scheduleSmtpEmail: + type: "object" + properties: + messageId: + type: "string" + example: "<201798300811.5787683@relay.domain.com>" + description: "Message ID of the transactional email scheduled" + messageIds: + type: "array" + items: + type: "string" + description: "version wise message ID's of the transactional emails scheduled" + batchId: + type: "string" + example: "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d" + description: "Batch ID of the batch transactional email scheduled" + createReseller: + type: "object" + required: + - "authKey" + properties: + authKey: + type: "string" + example: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + description: "AuthKey of Reseller child created" + id: + type: "integer" + format: "int64" + example: 1234567 + description: "Id of Reseller child created" + example: + authKey: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + id: 1234567 + sendSms: + type: "object" + required: + - "messageId" + - "reference" + properties: + reference: + type: "string" + example: "ab1cde2fgh3i4jklmno" + messageId: + type: "integer" + format: "int64" + example: 1511882900176220 + smsCount: + type: "integer" + format: "int64" + example: 2 + description: "Count of SMS's to send multiple text messages" + usedCredits: + type: "number" + format: "float" + example: 0.7 + description: "SMS credits used per text message" + remainingCredits: + type: "number" + format: "float" + example: 82.85 + description: "Remaining SMS credits of the user" + example: + reference: "ab1cde2fgh3i4jklmno" + remainingCredits: 82.85 + smsCount: 2 + messageId: 1511882900176220 + usedCredits: 0.7 + createdProcessId: + type: "object" + required: + - "processId" + properties: + processId: + type: "integer" + format: "int64" + example: 78 + description: "Id of the process created" + example: + processId: 78 + createUpdateFolder: + type: "object" + properties: + name: + type: "string" + example: "Wordpress Contacts" + description: "Name of the folder" + postSendFailed: + type: "object" + required: + - "code" + - "message" + properties: + code: + type: "integer" + format: "int64" + example: "invalid_parameter" + description: "Response code" + message: + type: "string" + example: "The email could not be sent to all recipients" + description: "Response message" + unexistingEmails: + type: "array" + items: + type: "string" + format: "email" + example: "matthew.dow@example.com, elisa.carrely@example.com" + description: "Email addresses you tried to sent an email to, but not existing\ + \ in your contacts" + withoutListEmails: + type: "array" + items: + type: "string" + format: "email" + example: "jeff.dean@example.com, jim.sue@example.com" + description: "Email addresses you sent an email to, without a contact list" + blackListedEmails: + type: "array" + items: + type: "string" + format: "email" + example: "jeff.dean@example.com, jim.sue@example.com" + description: "Email addresses which are blacklisted. ONLY FOR email-campign's\ + \ sendTest OR smtp-template's sendTest api's." + postSendSmsTestFailed: + type: "object" + required: + - "code" + - "message" + properties: + code: + type: "integer" + format: "int64" + example: "invalid_parameter" + description: "Response code" + message: + type: "string" + example: "The SMS could not be sent to all recipients" + description: "Response message" + unexistingSms: + type: "array" + items: + type: "string" + format: "email" + example: "337699086644@mailin.com, 41778899954@mailin.com" + description: "Email addresses you tried to sent a SMS to, but not existing\ + \ in your contacts" + withoutListSms: + type: "array" + items: + type: "string" + format: "email" + example: "3542388988@mailin.com, 10976444477@mailin.com" + description: "Email addresses you sent a SMS to, without a contact list" + postContactInfo: + type: "object" + required: + - "contacts" + properties: + contacts: + $ref: "#/definitions/postContactInfo_contacts" + example: + contacts: + total: 27 + processId: 78 + success: + - "jeff32@example.com, jim56@example.com" + - "jeff32@example.com, jim56@example.com" + failure: + - "jeff32@example.com, jim56@example.com" + - "jeff32@example.com, jim56@example.com" + getAggregatedReport: + type: "object" + properties: + range: + type: "string" + example: "2016-09-08|2017-04-06" + description: "Time frame of the report" + requests: + type: "integer" + format: "int64" + example: 263 + description: "Number of requests for the timeframe" + delivered: + type: "integer" + format: "int64" + example: 249 + description: "Number of delivered emails for the timeframe" + hardBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of hardbounces for the timeframe" + softBounces: + type: "integer" + format: "int64" + example: 4 + description: "Number of softbounces for the timeframe" + clicks: + type: "integer" + format: "int64" + example: 12 + description: "Number of clicks for the timeframe" + uniqueClicks: + type: "integer" + format: "int64" + example: 8 + description: "Number of unique clicks for the timeframe" + opens: + type: "integer" + format: "int64" + example: 47 + description: "Number of openings for the timeframe" + uniqueOpens: + type: "integer" + format: "int64" + example: 37 + description: "Number of unique openings for the timeframe" + spamReports: + type: "integer" + format: "int64" + example: 0 + description: "Number of complaint (spam report) for the timeframe" + blocked: + type: "integer" + format: "int64" + example: 2 + description: "Number of blocked contact emails for the timeframe" + invalid: + type: "integer" + format: "int64" + example: 0 + description: "Number of invalid emails for the timeframe" + unsubscribed: + type: "integer" + format: "int64" + example: 0 + description: "Number of unsubscribed emails for the timeframe" + getTransacBlockedContacts: + type: "object" + properties: + count: + type: "integer" + format: "int64" + example: 1 + description: "Count of blocked or unsubscribed contact" + contacts: + type: "array" + items: + $ref: "#/definitions/getTransacBlockedContacts_contacts" + getReports: + type: "object" + properties: + reports: + type: "array" + items: + $ref: "#/definitions/getReports_reports" + getEmailEventReport: + type: "object" + properties: + events: + type: "array" + items: + $ref: "#/definitions/getEmailEventReport_events" + getSmsEventReport: + type: "object" + properties: + events: + type: "array" + items: + $ref: "#/definitions/getSmsEventReport_events" + getSmtpTemplateOverview: + type: "object" + required: + - "createdAt" + - "htmlContent" + - "id" + - "isActive" + - "modifiedAt" + - "name" + - "replyTo" + - "sender" + - "subject" + - "tag" + - "testSent" + - "toField" + properties: + id: + type: "integer" + format: "int64" + example: 4 + description: "ID of the template" + name: + type: "string" + example: "Order Confirmation - EN" + description: "Name of the template" + subject: + type: "string" + example: "Thanks for your order !" + description: "Subject of the template" + isActive: + type: "boolean" + example: true + description: "Status of template (true=active, false=inactive)" + testSent: + type: "boolean" + example: true + description: "Status of test sending for the template (true=test email has\ + \ been sent, false=test email has not been sent)" + sender: + $ref: "#/definitions/getSmtpTemplateOverview_sender" + replyTo: + type: "string" + format: "email" + example: "replyto@domain.com" + description: "Email defined as the \"Reply to\" for the template" + toField: + type: "string" + example: "{FIRSTNAME} {LASTNAME}" + description: "Customisation of the \"to\" field for the template" + tag: + type: "string" + example: "sports" + description: "Tag of the template" + htmlContent: + type: "string" + example: "Your order n°xxxxx has been confirmed. Thanks for your purchase." + description: "HTML content of the template" + createdAt: + type: "string" + example: "2017-05-01T12:30:00Z" + description: "Creation UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)" + modifiedAt: + type: "string" + example: "2017-05-12T12:30:00Z" + description: "Last modification UTC date-time of the template (YYYY-MM-DDTHH:mm:ss.SSSZ)" + doiTemplate: + type: "boolean" + example: false + description: "It is true if template is a valid Double opt-in (DOI) template,\ + \ otherwise it is false. This field will be available only in case of single\ + \ template detail call." + getSmtpTemplates: + type: "object" + properties: + count: + type: "integer" + format: "int64" + example: 1 + description: "Count of transactional email templates" + templates: + type: "array" + items: + $ref: "#/definitions/getSmtpTemplateOverview" + getWebhook: + type: "object" + required: + - "createdAt" + - "description" + - "events" + - "id" + - "modifiedAt" + - "type" + - "url" + properties: + url: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "URL of the webhook" + id: + type: "integer" + format: "int64" + example: 654 + description: "ID of the webhook" + description: + type: "string" + example: "Webhook triggered on campaign openings" + description: "Description of the webhook" + events: + type: "array" + items: + type: "string" + example: "opens,clicks" + description: "Events which will trigger the webhook when they occure" + type: + type: "string" + example: "marketing" + description: "Type of webhook (marketing or transac)" + enum: + - "marketing" + - "transac" + createdAt: + type: "string" + example: "2016-12-01T12:50:00Z" + description: "Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)" + modifiedAt: + type: "string" + example: "2017-05-12T13:15:00Z" + description: "Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ)" + getWebhooks: + type: "object" + required: + - "webhooks" + properties: + webhooks: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getWebhook" + getContactDetails: + type: "object" + required: + - "attributes" + - "createdAt" + - "email" + - "emailBlacklisted" + - "id" + - "listIds" + - "modifiedAt" + - "smsBlacklisted" + properties: + email: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Email address of the contact for which you requested the details" + id: + type: "integer" + format: "int64" + example: 32 + description: "ID of the contact for which you requested the details" + emailBlacklisted: + type: "boolean" + example: false + description: "Blacklist status for email campaigns (true=blacklisted, false=not\ + \ blacklisted)" + smsBlacklisted: + type: "boolean" + example: true + description: "Blacklist status for SMS campaigns (true=blacklisted, false=not\ + \ blacklisted)" + createdAt: + type: "string" + example: "2017-05-12T12:30:00Z" + description: "Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)" + modifiedAt: + type: "string" + example: "2017-05-12T12:30:00Z" + description: "Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ)" + listIds: + type: "array" + items: + type: "integer" + format: "int64" + example: "12,9,20" + description: "List(s) in which the contact is included" + listUnsubscribed: + type: "array" + items: + type: "integer" + format: "int64" + example: "1,2" + description: "List(s) in which the contact is included (only available if\ + \ unsubscription per list is activated for the account)" + attributes: + type: "object" + example: + name: "Joe" + email: "joe@example.com" + description: "Set of attributes of the contact" + properties: {} + getExtendedContactDetails: + allOf: + - $ref: "#/definitions/getContactDetails" + - type: "object" + required: + - "statistics" + properties: + statistics: + $ref: "#/definitions/getExtendedContactDetails_statistics" + getContactCampaignStats: + type: "object" + properties: + messagesSent: + type: "array" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + hardBounces: + type: "array" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + softBounces: + type: "array" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + complaints: + type: "array" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + unsubscriptions: + $ref: "#/definitions/getContactCampaignStats_unsubscriptions" + opened: + type: "array" + items: + $ref: "#/definitions/getContactCampaignStats_opened" + clicked: + type: "array" + items: + $ref: "#/definitions/getContactCampaignStats_clicked" + transacAttributes: + type: "array" + items: + $ref: "#/definitions/getContactCampaignStats_transacAttributes" + delivered: + type: "array" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + description: "Campaign Statistics for the contact" + getContacts: + type: "object" + required: + - "contacts" + - "count" + properties: + contacts: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getContactDetails" + count: + type: "integer" + format: "int64" + example: 17655 + description: "Number of contacts" + getAttributes: + type: "object" + required: + - "attributes" + properties: + attributes: + type: "array" + description: "Listing of available contact attributes in your account" + items: + $ref: "#/definitions/getAttributes_attributes" + getFolders: + type: "object" + properties: + folders: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getFolder" + count: + type: "integer" + format: "int64" + example: 10 + description: "Number of folders available in your account" + getFolder: + type: "object" + required: + - "id" + - "name" + - "totalBlacklisted" + - "totalSubscribers" + - "uniqueSubscribers" + properties: + id: + type: "integer" + format: "int64" + example: 2 + description: "ID of the folder" + name: + type: "string" + example: "Magento Customers" + description: "Name of the folder" + totalBlacklisted: + type: "integer" + format: "int64" + example: 32 + description: "Number of blacklisted contacts in the folder" + totalSubscribers: + type: "integer" + format: "int64" + example: 19777 + description: "Number of contacts in the folder" + uniqueSubscribers: + type: "integer" + format: "int64" + example: 16222 + description: "Number of unique contacts in the folder" + getFolderLists: + type: "object" + properties: + lists: + type: "array" + items: + type: "object" + allOf: + - $ref: "#/definitions/getList" + count: + type: "integer" + format: "int64" + example: 6 + description: "Number of lists in the folder" + getLists: + type: "object" + properties: + lists: + type: "array" + description: "Listing of all the lists available in your account" + items: + type: "object" + allOf: + - $ref: "#/definitions/getList" + - type: "object" + properties: + folderId: + type: "integer" + format: "int64" + example: 2 + description: "ID of the folder" + required: + - "folderId" + count: + type: "integer" + format: "int64" + example: 150 + description: "Number of lists in your account" + getList: + type: "object" + required: + - "id" + - "name" + - "totalBlacklisted" + - "totalSubscribers" + - "uniqueSubscribers" + properties: + id: + type: "integer" + format: "int64" + example: 23 + description: "ID of the list" + name: + type: "string" + example: "Magento Customers - EN" + description: "Name of the list" + totalBlacklisted: + type: "integer" + format: "int64" + example: 13 + description: "Number of blacklisted contacts in the list" + totalSubscribers: + type: "integer" + format: "int64" + example: 1776 + description: "Number of contacts in the list" + uniqueSubscribers: + type: "integer" + format: "int64" + example: 1789 + description: "Number of unique contacts in the list" + getExtendedList: + allOf: + - $ref: "#/definitions/getList" + - type: "object" + required: + - "createdAt" + - "folderId" + properties: + folderId: + type: "integer" + format: "int64" + example: 2 + description: "ID of the folder" + createdAt: + type: "string" + example: "2017-03-13T17:05:09Z" + description: "Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ)" + campaignStats: + type: "array" + items: + $ref: "#/definitions/getExtendedList_campaignStats" + dynamicList: + type: "boolean" + example: false + description: "Status telling if the list is dynamic or not (true=dynamic,\ + \ false=not dynamic)" + getSmsCampaignStats: + type: "object" + required: + - "answered" + - "delivered" + - "hardBounces" + - "processing" + - "sent" + - "softBounces" + - "unsubscriptions" + properties: + delivered: + type: "integer" + format: "int64" + example: 2987 + description: "Number of delivered SMS" + sent: + type: "integer" + format: "int64" + example: 3000 + description: "Number of sent SMS" + processing: + type: "integer" + format: "int64" + example: 0 + description: "Number of processing SMS" + softBounces: + type: "integer" + format: "int64" + example: 3 + description: "Number of softbounced SMS" + hardBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of hardbounced SMS" + unsubscriptions: + type: "integer" + format: "int64" + example: 3 + description: "Number of unsubscription SMS" + answered: + type: "integer" + format: "int64" + example: 2 + description: "Number of replies to the SMS" + getDeviceBrowserStats: + type: "object" + required: + - "clickers" + - "uniqueClicks" + - "uniqueViews" + - "viewed" + properties: + clickers: + type: "integer" + format: "int64" + example: 2665 + description: "Number of total clicks for the campaign using the particular\ + \ browser" + uniqueClicks: + type: "integer" + format: "int64" + example: 2300 + description: "Number of unique clicks for the campaign using the particular\ + \ browser" + viewed: + type: "integer" + format: "int64" + example: 8999 + description: "Number of openings for the campaign using the particular browser" + uniqueViews: + type: "integer" + format: "int64" + example: 7779 + description: "Number of unique openings for the campaign using the particular\ + \ browser" + getCampaignStats: + type: "object" + required: + - "clickers" + - "complaints" + - "delivered" + - "hardBounces" + - "sent" + - "softBounces" + - "trackableViews" + - "uniqueClicks" + - "uniqueViews" + - "unsubscriptions" + - "viewed" + properties: + listId: + type: "integer" + format: "int64" + example: 2 + description: "List Id of email campaign (only in case of get email campaign(s)(not\ + \ for global stats))" + uniqueClicks: + type: "integer" + format: "int64" + example: 2300 + description: "Number of unique clicks for the campaign" + clickers: + type: "integer" + format: "int64" + example: 2665 + description: "Number of total clicks for the campaign" + complaints: + type: "integer" + format: "int64" + example: 1 + description: "Number of complaints (Spam reports) for the campaign" + delivered: + type: "integer" + format: "int64" + example: 19765 + description: "Number of delivered emails for the campaign" + sent: + type: "integer" + format: "int64" + example: 19887 + description: "Number of sent emails for the campaign" + softBounces: + type: "integer" + format: "int64" + example: 100 + description: "Number of softbounce for the campaign" + hardBounces: + type: "integer" + format: "int64" + example: 87 + description: "Number of harbounce for the campaign" + uniqueViews: + type: "integer" + format: "int64" + example: 7779 + description: "Number of unique openings for the campaign" + trackableViews: + type: "integer" + format: "int64" + example: 5661 + description: "Recipients without any privacy protection option enabled in\ + \ their email client" + trackableViewsRate: + type: "number" + format: "float" + example: 23.45 + description: "Rate of recipients without any privacy protection option enabled\ + \ in their email client" + estimatedViews: + type: "integer" + format: "int64" + example: 560 + description: "Rate of recipients without any privacy protection option enabled\ + \ in their email client, applied to all delivered emails" + unsubscriptions: + type: "integer" + format: "int64" + example: 2 + description: "Number of unsubscription for the campaign" + viewed: + type: "integer" + format: "int64" + example: 8999 + description: "Number of openings for the campaign" + deferred: + type: "integer" + format: "int64" + example: 30 + description: "Number of deferred emails for the campaign" + returnBounce: + type: "integer" + format: "int64" + example: 5 + description: "Total number of non-delivered campaigns for a particular campaign\ + \ id." + updateSmtpTemplate: + type: "object" + properties: + tag: + type: "string" + example: "OrderConfirmation" + description: "Tag of the template" + sender: + $ref: "#/definitions/updateSmtpTemplate_sender" + templateName: + type: "string" + example: "Order Confirmation - EN" + description: "Name of the template" + htmlContent: + type: "string" + example: "The order n°xxxxx has been confirmed. Thanks for your purchase" + description: "Required if htmlUrl is empty. If the template is designed using\ + \ Drag & Drop editor via HTML content, then the design page will not have\ + \ Drag & Drop editor access for that template. Body of the message (HTML\ + \ must have more than 10 characters)" + htmlUrl: + type: "string" + format: "url" + example: "https://html.domain.com" + description: "Required if htmlContent is empty. URL to the body of the email\ + \ (HTML)" + subject: + type: "string" + example: "Thanks for your purchase !" + description: "Subject of the email" + replyTo: + type: "string" + format: "email" + example: "support@myshop.com" + description: "Email on which campaign recipients will be able to reply to" + toField: + type: "string" + example: "{FNAME} {LNAME}" + description: "To personalize the «To» Field. If you want to include the first\ + \ name and last name of your recipient, add {FNAME} {LNAME}. These contact\ + \ attributes must already exist in your SendinBlue account. If input parameter\ + \ 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization" + attachmentUrl: + type: "string" + format: "url" + example: "https://attachment.domain.com" + description: "Absolute url of the attachment (no local file). Extension allowed:\ + \ xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif,\ + \ tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar,\ + \ ez, ics, mobi, msg, pub and eps" + isActive: + type: "boolean" + example: true + description: "Status of the template. isActive = false means template is inactive,\ + \ isActive = true means template is active" + updateCampaignStatus: + type: "object" + properties: + status: + type: "string" + description: "Note:- replicateTemplate status will be available only for template\ + \ type campaigns." + enum: + - "suspended" + - "archive" + - "darchive" + - "sent" + - "queued" + - "replicate" + - "replicateTemplate" + - "draft" + description: "Status of the campaign" + example: "draft" + createSmtpTemplate: + type: "object" + required: + - "sender" + - "subject" + - "templateName" + properties: + tag: + type: "string" + example: "OrderConfirmation" + description: "Tag of the template" + sender: + $ref: "#/definitions/createSmtpTemplate_sender" + templateName: + type: "string" + example: "Order Confirmation - EN" + description: "Name of the template" + htmlContent: + type: "string" + example: "The order n°xxxxx has been confirmed. Thanks for your purchase" + description: "Body of the message (HTML version). The field must have more\ + \ than 10 characters. REQUIRED if htmlUrl is empty" + htmlUrl: + type: "string" + format: "url" + example: "https://html.domain.com" + description: "Url which contents the body of the email message. REQUIRED if\ + \ htmlContent is empty" + subject: + type: "string" + example: "Thanks for your purchase !" + description: "Subject of the template" + replyTo: + type: "string" + format: "email" + example: "support@myshop.com" + description: "Email on which campaign recipients will be able to reply to" + toField: + type: "string" + example: "{FNAME} {LNAME}" + description: "To personalize the «To» Field. If you want to include the first\ + \ name and last name of your recipient, add {FNAME} {LNAME}. These contact\ + \ attributes must already exist in your SendinBlue account. If input parameter\ + \ 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization" + attachmentUrl: + type: "string" + format: "url" + example: "https://attachment.domain.com" + description: "Absolute url of the attachment (no local file). Extension allowed:\ + \ xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif,\ + \ tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar,\ + \ ez, ics, mobi, msg, pub and eps" + isActive: + type: "boolean" + example: true + description: "Status of template. isActive = true means template is active\ + \ and isActive = false means template is inactive" + createEmailCampaign: + type: "object" + required: + - "name" + - "sender" + properties: + tag: + type: "string" + example: "Newsletter" + description: "Tag of the campaign" + sender: + $ref: "#/definitions/createEmailCampaign_sender" + name: + type: "string" + example: "Newsletter - May 2017" + description: "Name of the campaign" + htmlContent: + type: "string" + example: "

Confirm you email

Please\ + \ confirm your email address by clicking on the link below

" + description: "Mandatory if htmlUrl and templateId are empty. Body of the message\ + \ (HTML)" + htmlUrl: + type: "string" + format: "url" + example: "https://html.domain.com" + description: "Mandatory if htmlContent and templateId are empty. Url to the\ + \ message (HTML)" + templateId: + type: "integer" + format: "int64" + description: "Mandatory if htmlContent and htmlUrl are empty. Id of the transactional\ + \ email template with status 'active'. Used to copy only its content fetched\ + \ from htmlContent/htmlUrl to an email campaign for RSS feature." + scheduledAt: + type: "string" + example: "2017-06-01T12:30:00+02:00" + description: "Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to\ + \ pass your timezone in date-time format for accurate result. If sendAtBestTime\ + \ is set to true, your campaign will be sent according to the date passed\ + \ (ignoring the time part)." + subject: + type: "string" + example: "Discover the New Collection !" + description: "Subject of the campaign. Mandatory if abTesting is false. Ignored\ + \ if abTesting is true." + replyTo: + type: "string" + format: "email" + example: "support@myshop.com" + description: "Email on which the campaign recipients will be able to reply\ + \ to" + toField: + type: "string" + example: "{FNAME} {LNAME}" + description: "To personalize the «To» Field. If you want to include the first\ + \ name and last name of your recipient, add {FNAME} {LNAME}. These contact\ + \ attributes must already exist in your SendinBlue account. If input parameter\ + \ 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization" + recipients: + $ref: "#/definitions/createEmailCampaign_recipients" + attachmentUrl: + type: "string" + format: "url" + example: "https://attachment.domain.com" + description: "Absolute url of the attachment (no local file). Extension allowed:\ + \ xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif,\ + \ tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar,\ + \ ez, ics, mobi, msg, pub and eps" + inlineImageActivation: + type: "boolean" + example: true + description: "Use true to embedded the images in your email. Final size of\ + \ the email should be less than 4MB. Campaigns with embedded images can\ + \ not be sent to more than 5000 contacts" + default: false + mirrorActive: + type: "boolean" + example: true + description: "Use true to enable the mirror link" + footer: + type: "string" + example: "[DEFAULT_FOOTER]" + description: "Footer of the email campaign" + header: + type: "string" + example: "[DEFAULT_HEADER]" + description: "Header of the email campaign" + utmCampaign: + type: "string" + example: "NL_05_2017" + description: "Customize the utm_campaign value. If this field is empty, the\ + \ campaign name will be used. Only alphanumeric characters and spaces are\ + \ allowed" + params: + type: "object" + example: + FNAME: "Joe" + LNAME: "Doe" + description: "Pass the set of attributes to customize the type classic campaign.\ + \ For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if\ + \ 'type' is 'classic'. It's considered only if campaign is in New Template\ + \ Language format. The New Template Language is dependent on the values\ + \ of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField'" + properties: {} + sendAtBestTime: + type: "boolean" + example: true + description: "Set this to true if you want to send your campaign at best time." + default: false + abTesting: + type: "boolean" + example: true + description: "Status of A/B Test. abTesting = false means it is disabled,\ + \ & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule',\ + \ 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is\ + \ set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject'\ + \ if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'.\ + \ You will be able to set up two subject lines for your campaign and send\ + \ them to a random sample of your total recipients. Half of the test group\ + \ will receive version A, and the other half will receive version B" + default: false + subjectA: + type: "string" + example: "Discover the New Collection!" + description: "Subject A of the campaign. Mandatory if abTesting = true. subjectA\ + \ & subjectB should have unique value" + subjectB: + type: "string" + example: "Want to discover the New Collection?" + description: "Subject B of the campaign. Mandatory if abTesting = true. subjectA\ + \ & subjectB should have unique value" + splitRule: + type: "integer" + format: "int64" + example: 50 + description: "Add the size of your test groups. Mandatory if abTesting = true\ + \ & 'recipients' is passed. We'll send version A and B to a random sample\ + \ of recipients, and then the winning version to everyone else" + minimum: 1 + maximum: 50 + winnerCriteria: + type: "string" + example: "open" + description: "Choose the metrics that will determinate the winning version.\ + \ Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria'\ + \ is ignored if passed" + enum: + - "open" + - "click" + winnerDelay: + type: "integer" + format: "int64" + example: 50 + description: "Choose the duration of the test in hours. Maximum is 7 days,\ + \ pass 24*7 = 168 hours. The winning version will be sent at the end of\ + \ the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay'\ + \ is ignored if passed" + minimum: 1 + maximum: 168 + ipWarmupEnable: + type: "boolean" + example: true + description: "Available for dedicated ip clients. Set this to true if you\ + \ wish to warm up your ip." + default: false + initialQuota: + type: "integer" + format: "int64" + example: 3000 + description: "Mandatory if ipWarmupEnable is set to true. Set an initial quota\ + \ greater than 1 for warming up your ip. We recommend you set a value of\ + \ 3000." + increaseRate: + type: "integer" + format: "int64" + example: 70 + description: "Mandatory if ipWarmupEnable is set to true. Set a percentage\ + \ increase rate for warming up your ip. We recommend you set the increase\ + \ rate to 30% per day. If you want to send the same number of emails every\ + \ day, set the daily increase value to 0%." + minimum: 0 + maximum: 100 + updateEmailCampaign: + type: "object" + properties: + tag: + type: "string" + example: "Newsletter" + description: "Tag of the campaign" + sender: + $ref: "#/definitions/updateEmailCampaign_sender" + name: + type: "string" + example: "Newsletter - May 2017" + description: "Name of the campaign" + htmlContent: + type: "string" + example: "

Confirm you email

Please\ + \ confirm your email address by clicking on the link below

" + description: "Body of the message (HTML version). If the campaign is designed\ + \ using Drag & Drop editor via HTML content, then the design page will not\ + \ have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl\ + \ is empty" + htmlUrl: + type: "string" + format: "url" + example: "https://html.domain.com" + description: "Url which contents the body of the email message. REQUIRED if\ + \ htmlContent is empty" + scheduledAt: + type: "string" + example: "2017-06-01T12:30:00+02:00" + description: "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ).\ + \ Prefer to pass your timezone in date-time format for accurate result.\ + \ If sendAtBestTime is set to true, your campaign will be sent according\ + \ to the date passed (ignoring the time part)." + subject: + type: "string" + example: "Discover the New Collection !" + description: "Subject of the campaign" + replyTo: + type: "string" + format: "email" + example: "support@myshop.com" + description: "Email on which campaign recipients will be able to reply to" + toField: + type: "string" + example: "{FNAME} {LNAME}" + description: "To personalize the «To» Field. If you want to include the first\ + \ name and last name of your recipient, add {FNAME} {LNAME}. These contact\ + \ attributes must already exist in your SendinBlue account. If input parameter\ + \ 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization" + recipients: + $ref: "#/definitions/updateEmailCampaign_recipients" + attachmentUrl: + type: "string" + format: "url" + example: "https://attachment.domain.com" + description: "Absolute url of the attachment (no local file). Extension allowed:\ + \ xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif,\ + \ tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar,\ + \ ez, ics, mobi, msg, pub and eps" + inlineImageActivation: + type: "boolean" + example: true + description: "Status of inline image. inlineImageActivation = false means\ + \ image can’t be embedded, & inlineImageActivation = true means image can\ + \ be embedded, in the email. You cannot send a campaign of more than 4MB\ + \ with images embedded in the email. Campaigns with the images embedded\ + \ in the email must be sent to less than 5000 contacts." + default: false + mirrorActive: + type: "boolean" + example: true + description: "Status of mirror links in campaign. mirrorActive = false means\ + \ mirror links are deactivated, & mirrorActive = true means mirror links\ + \ are activated, in the campaign" + recurring: + type: "boolean" + example: false + description: "FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false\ + \ means contact can receive the same Trigger campaign only once, & recurring\ + \ = true means contact can receive the same Trigger campaign several times" + default: false + footer: + type: "string" + example: "[DEFAULT_FOOTER]" + description: "Footer of the email campaign" + header: + type: "string" + example: "[DEFAULT_HEADER]" + description: "Header of the email campaign" + utmCampaign: + type: "string" + example: "NL_05_2017" + description: "Customize the utm_campaign value. If this field is empty, the\ + \ campaign name will be used. Only alphanumeric characters and spaces are\ + \ allowed" + params: + type: "object" + example: + FNAME: "Joe" + LNAME: "Doe" + description: "Pass the set of attributes to customize the type 'classic' campaign.\ + \ For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field\ + \ will get updated, only if the campaign is in New Template Language, else\ + \ ignored. The New Template Language is dependent on the values of 'subject',\ + \ 'htmlContent/htmlUrl', 'sender.name' & 'toField'" + properties: {} + sendAtBestTime: + type: "boolean" + example: true + description: "Set this to true if you want to send your campaign at best time.\ + \ Note:- if true, warmup ip will be disabled." + abTesting: + type: "boolean" + example: true + description: "Status of A/B Test. abTesting = false means it is disabled,\ + \ & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule',\ + \ 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set\ + \ to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime'\ + \ is 'false'. You will be able to set up two subject lines for your campaign\ + \ and send them to a random sample of your total recipients. Half of the\ + \ test group will receive version A, and the other half will receive version\ + \ B" + default: false + subjectA: + type: "string" + example: "Discover the New Collection!" + description: "Subject A of the campaign. Considered if abTesting = true. subjectA\ + \ & subjectB should have unique value" + subjectB: + type: "string" + example: "Want to discover the New Collection?" + description: "Subject B of the campaign. Considered if abTesting = true. subjectA\ + \ & subjectB should have unique value" + splitRule: + type: "integer" + format: "int64" + example: 50 + description: "Add the size of your test groups. Considered if abTesting =\ + \ true. We'll send version A and B to a random sample of recipients, and\ + \ then the winning version to everyone else" + minimum: 1 + maximum: 50 + winnerCriteria: + type: "string" + example: "open" + description: "Choose the metrics that will determinate the winning version.\ + \ Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria'\ + \ is ignored if passed or alreday exist in record" + enum: + - "open" + - "click" + winnerDelay: + type: "integer" + format: "int64" + example: 50 + description: "Choose the duration of the test in hours. Maximum is 7 days,\ + \ pass 24*7 = 168 hours. The winning version will be sent at the end of\ + \ the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50,\ + \ 'winnerDelay' is ignored if passed or alreday exist in record" + minimum: 1 + maximum: 168 + ipWarmupEnable: + type: "boolean" + example: true + description: "Available for dedicated ip clients. Set this to true if you\ + \ wish to warm up your ip." + default: false + initialQuota: + type: "integer" + format: "int64" + example: 3000 + description: "Set an initial quota greater than 1 for warming up your ip.\ + \ We recommend you set a value of 3000." + increaseRate: + type: "integer" + format: "int64" + example: 70 + description: "Set a percentage increase rate for warming up your ip. We recommend\ + \ you set the increase rate to 30% per day. If you want to send the same\ + \ number of emails every day, set the daily increase value to 0%." + minimum: 0 + maximum: 100 + getSharedTemplateUrl: + type: "object" + required: + - "sharedUrl" + properties: + sharedUrl: + type: "string" + format: "url" + example: "https://my.sendinblue.com/pt2YU7R5W_guXlowgumy_VX4pFsKu._zd0Gjj96x1_GMmzc1Qps5ZIpj6nx-" + description: "A unique URL for the email campaign or transactional template.\ + \ This URL can be shared with other Sendinblue users." + abTestCampaignResult: + type: "object" + properties: + winningVersion: + type: "string" + example: "A" + description: "Winning Campaign Info. pending = Campaign has been picked for\ + \ sending and winning version is yet to be decided, tie = A tie happened\ + \ between both the versions, notAvailable = Campaign has not yet been picked\ + \ for sending." + enum: + - "notAvailable" + - "pending" + - "tie" + - "A" + - "B" + winningCriteria: + type: "string" + example: "Open" + description: "Criteria choosen for winning version (Open/Click)" + enum: + - "Open" + - "Click" + winningSubjectLine: + type: "string" + example: "Subject Line A" + description: "Subject Line of current winning version" + openRate: + type: "string" + example: "70%" + description: "Open rate for current winning version" + clickRate: + type: "string" + example: "70%" + description: "Click rate for current winning version" + winningVersionRate: + type: "string" + example: "70%" + description: "Open/Click rate for the winner version" + statistics: + $ref: "#/definitions/abTestCampaignResult_statistics" + clickedLinks: + $ref: "#/definitions/abTestCampaignResult_clickedLinks" + emailExportRecipients: + type: "object" + required: + - "recipientsType" + properties: + notifyURL: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "Webhook called once the export process is finished. For reference,\ + \ https://help.sendinblue.com/hc/en-us/articles/360007666479" + recipientsType: + type: "string" + example: "openers" + description: "Type of recipients to export for a campaign" + enum: + - "all" + - "nonClickers" + - "nonOpeners" + - "clickers" + - "openers" + - "softBounces" + - "hardBounces" + - "unsubscribed" + requestSmsRecipientExport: + type: "object" + required: + - "recipientsType" + properties: + notifyURL: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "URL that will be called once the export process is finished.\ + \ For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479" + recipientsType: + type: "string" + example: "answered" + description: "Filter the recipients based on how they interacted with the\ + \ campaign" + enum: + - "all" + - "delivered" + - "answered" + - "softBounces" + - "hardBounces" + - "unsubscribed" + sendReport: + type: "object" + required: + - "email" + properties: + language: + type: "string" + example: "en" + description: "Language of email content for campaign report sending." + default: "fr" + enum: + - "fr" + - "es" + - "pt" + - "it" + - "de" + - "en" + email: + $ref: "#/definitions/sendReport_email" + uploadImageToGallery: + type: "object" + required: + - "imageUrl" + properties: + imageUrl: + type: "string" + example: "https://somedomain.com/image1.jpg" + description: "The absolute url of the image (no local file). Maximum allowed\ + \ size for image is 2MB. Allowed extensions for images are - jpeg, jpg,\ + \ png, bmp, gif." + name: + type: "string" + example: "nature.jpg" + description: "Name of the image." + sendSmtpEmail: + type: "object" + properties: + sender: + $ref: "#/definitions/sendSmtpEmail_sender" + to: + type: "array" + description: "Mandatory if messageVersions are not passed, ignored if messageVersions\ + \ are passed. List of email addresses and names (optional) of the recipients.\ + \ For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"},\ + \ {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]" + items: + $ref: "#/definitions/sendSmtpEmail_to" + bcc: + type: "array" + description: "List of email addresses and names (optional) of the recipients\ + \ in bcc" + items: + $ref: "#/definitions/sendSmtpEmail_bcc" + cc: + type: "array" + description: "List of email addresses and names (optional) of the recipients\ + \ in cc" + items: + $ref: "#/definitions/sendSmtpEmail_cc" + htmlContent: + type: "string" + example: "

Confirm you email

Please\ + \ confirm your email address by clicking on the link below

" + description: "HTML body of the message ( Mandatory if 'templateId' is not\ + \ passed, ignored if 'templateId' is passed )" + textContent: + type: "string" + example: "Please confirm your email address by clicking on the link https://text.domain.com" + description: "Plain Text body of the message ( Ignored if 'templateId' is\ + \ passed )" + subject: + type: "string" + example: "Login Email confirmation" + description: "Subject of the message. Mandatory if 'templateId' is not passed" + replyTo: + $ref: "#/definitions/sendSmtpEmail_replyTo" + attachment: + type: "array" + description: "Pass the absolute URL (no local file) or the base64 content\ + \ of the attachment along with the attachment name (Mandatory if attachment\ + \ content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\"\ + , \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\"\ + , \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment\ + \ file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg,\ + \ png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx,\ + \ tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac,\ + \ wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm\ + \ ( If 'templateId' is passed and is in New Template Language format then\ + \ both attachment url and content are accepted. If template is in Old template\ + \ Language format, then 'attachment' is ignored )" + items: + $ref: "#/definitions/sendSmtpEmail_attachment" + headers: + type: "object" + example: + sender.ip: "1.2.3.4" + X-Mailin-custom: "some_custom_header" + idempotencyKey: "abc-123" + description: "Pass the set of custom headers (not the standard headers) that\ + \ shall be sent along the mail headers in the original email. 'sender.ip'\ + \ header can be set (only for dedicated ip users) to mention the IP to be\ + \ used for sending transactional emails. Headers are allowed in `This-Case-Only`\ + \ (i.e. words separated by hyphen with first letter of each word in capital\ + \ letter), they will be converted to such case styling if not in this format\ + \ in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\"\ + :\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`." + properties: {} + templateId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the template." + params: + type: "object" + example: + FNAME: "Joe" + LNAME: "Doe" + description: "Pass the set of attributes to customize the template. For example,\ + \ {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template\ + \ is in New Template Language format." + properties: {} + messageVersions: + type: "array" + description: "You can customize and send out multiple versions of a mail.\ + \ templateId can be customized only if global parameter contains templateId.\ + \ htmlContent and textContent can be customized only if any of the two,\ + \ htmlContent or textContent, is present in global parameters. Some global\ + \ parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also\ + \ be customized specific to each version. Total number of recipients in\ + \ one API request must not exceed 2000. However, you can still pass upto\ + \ 99 recipients maximum in one message version. The size of individual params\ + \ in all the messageVersions shall not exceed 100 KB limit and that of cumulative\ + \ params shall not exceed 1000 KB. You can follow this **step-by-step guide**\ + \ on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails" + items: + $ref: "#/definitions/sendSmtpEmail_messageVersions" + tags: + type: "array" + description: "Tag your emails to find them more easily" + items: + type: "string" + example: "tag1" + scheduledAt: + type: "string" + format: "date-time" + example: "2022-04-05T12:30:00+02:00" + description: "UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ).\ + \ Prefer to pass your timezone in date-time format for scheduling. There\ + \ can be an expected delay of +5 minutes in scheduled email delivery. **Please\ + \ note this feature is currently a public beta**." + batchId: + type: "string" + example: "5c6cfa04-eed9-42c2-8b5c-6d470d978e9d" + description: "Valid UUIDv4 batch id to identify the scheduled batches transactional\ + \ email. If not passed we will create a valid UUIDv4 batch id at our end." + deleteHardbounces: + type: "object" + properties: + startDate: + type: "string" + example: "2016-12-31" + description: "Starting date (YYYY-MM-DD) of the time period for deletion.\ + \ The hardbounces occurred after this date will be deleted. Must be less\ + \ than or equal to the endDate" + endDate: + type: "string" + example: "2017-01-31" + description: "Ending date (YYYY-MM-DD) of the time period for deletion. The\ + \ hardbounces until this date will be deleted. Must be greater than or equal\ + \ to the startDate" + contactEmail: + type: "string" + format: "email" + example: "alex76@example.com" + description: "Target a specific email address" + createWebhook: + type: "object" + required: + - "events" + - "url" + properties: + url: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "URL of the webhook" + description: + type: "string" + example: "Webhook triggered on unsubscription" + description: "Description of the webhook" + events: + type: "array" + description: "- Events triggering the webhook. Possible values for **Transactional**\ + \ type webhook:\n#### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`,\ + \ `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened`\ + \ and `unsubscribed`\n- Possible values for **Marketing** type webhook:\n\ + #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`,\ + \ `listAddition` & `delivered`\n- Possible values for **Inbound** type webhook:\n\ + #### `inboundEmailProcessed`\n" + items: + type: "string" + example: "unsubscribed" + enum: + - "sent" + - "hardBounce" + - "softBounce" + - "blocked" + - "spam" + - "delivered" + - "request" + - "click" + - "invalid" + - "deferred" + - "opened" + - "uniqueOpened" + - "unsubscribed" + - "listAddition" + - "contactUpdated" + - "contactDeleted" + - "inboundEmailProcessed" + type: + type: "string" + example: "marketing" + description: "Type of the webhook" + default: "transactional" + enum: + - "transactional" + - "marketing" + - "inbound" + domain: + type: "string" + example: "example.com" + description: "Inbound domain of webhook, required in case of event type `inbound`" + updateWebhook: + type: "object" + properties: + url: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "URL of the webhook" + description: + type: "string" + example: "Webhook triggered on contact hardbounce" + description: "Description of the webhook" + events: + type: "array" + description: "- Events triggering the webhook. Possible values for **Transactional**\ + \ type webhook:\n#### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`,\ + \ `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened`\ + \ and `unsubscribed`\n- Possible values for **Marketing** type webhook:\n\ + #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`,\ + \ `listAddition` & `delivered`\n- Possible values for **Inbound** type webhook:\n\ + #### `inboundEmailProcessed`\n" + items: + type: "string" + example: "hardBounce" + enum: + - "sent" + - "hardBounce" + - "softBounce" + - "blocked" + - "spam" + - "delivered" + - "request" + - "click" + - "invalid" + - "deferred" + - "opened" + - "uniqueOpened" + - "unsubscribed" + - "listAddition" + - "contactUpdated" + - "contactDeleted" + - "inboundEmailProcessed" + domain: + type: "string" + example: "example.com" + description: "Inbound domain of webhook, used in case of event type `inbound`" + createDoiContact: + type: "object" + required: + - "email" + - "includeListIds" + - "redirectionUrl" + - "templateId" + properties: + email: + type: "string" + format: "email" + example: "elly@example.com" + description: "Email address where the confirmation email will be sent. This\ + \ email address will be the identifier for all other contact attributes." + attributes: + type: "object" + example: + FNAME: "Elly" + LNAME: "Roger" + description: "Pass the set of attributes and their values. These attributes\ + \ must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'}" + properties: {} + includeListIds: + type: "array" + description: "Lists under user account where contact should be added" + items: + type: "integer" + format: "int64" + example: 36 + description: "Id of the list" + excludeListIds: + type: "array" + description: "Lists under user account where contact should not be added" + items: + type: "integer" + format: "int64" + example: 36 + description: "Id of the list" + templateId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the Double opt-in (DOI) template" + redirectionUrl: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "URL of the web page that user will be redirected to after clicking\ + \ on the double opt in URL. When editing your DOI template you can reference\ + \ this URL by using the tag {{ params.DOIurl }}." + createContact: + type: "object" + properties: + email: + type: "string" + format: "email" + example: "elly@example.com" + description: "Email address of the user. Mandatory if \"SMS\" field is not\ + \ passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should\ + \ be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"\ + } or {\"SMS\":\"0091xxxxxxxxxx\"}" + attributes: + type: "object" + example: + FNAME: "Elly" + LNAME: "Roger" + description: "Pass the set of attributes and their values. The attribute's\ + \ parameter should be passed in capital letter while creating a contact.\ + \ These attributes must be present in your SendinBlue account. For eg. {\"\ + FNAME\":\"Elly\", \"LNAME\":\"Roger\"}" + properties: {} + emailBlacklisted: + type: "boolean" + example: false + description: "Set this field to blacklist the contact for emails (emailBlacklisted\ + \ = true)" + smsBlacklisted: + type: "boolean" + example: false + description: "Set this field to blacklist the contact for SMS (smsBlacklisted\ + \ = true)" + listIds: + type: "array" + description: "Ids of the lists to add the contact to" + items: + type: "integer" + format: "int64" + example: 36 + description: "Id of the list to add the contact to" + updateEnabled: + type: "boolean" + example: false + description: "Facilitate to update the existing contact in the same request\ + \ (updateEnabled = true)" + default: false + smtpBlacklistSender: + type: "array" + description: "transactional email forbidden sender for contact. Use only for\ + \ email Contact ( only available if updateEnabled = true )" + items: + type: "string" + format: "email" + updateContact: + type: "object" + properties: + attributes: + type: "object" + example: + EMAIL: "newemail@domain.com" + FNAME: "Ellie" + LNAME: "Roger" + description: "Pass the set of attributes to be updated. These attributes must\ + \ be present in your account. To update existing email address of a contact\ + \ with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\"\ + :\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The\ + \ attribute's parameter should be passed in capital letter while updating\ + \ a contact. Keep in mind transactional attributes can be updated the same\ + \ way as normal attributes. Mobile Number in \"SMS\" field should be passed\ + \ with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"\ + SMS\":\"0091xxxxxxxxxx\"}" + properties: {} + emailBlacklisted: + type: "boolean" + example: false + description: "Set/unset this field to blacklist/allow the contact for emails\ + \ (emailBlacklisted = true)" + smsBlacklisted: + type: "boolean" + example: true + description: "Set/unset this field to blacklist/allow the contact for SMS\ + \ (smsBlacklisted = true)" + listIds: + type: "array" + description: "Ids of the lists to add the contact to" + items: + type: "integer" + format: "int64" + example: 65 + description: "Id of the list to add the contact to" + unlinkListIds: + type: "array" + description: "Ids of the lists to remove the contact from" + items: + type: "integer" + format: "int64" + example: 36 + description: "Id of the list to remove the contact from" + smtpBlacklistSender: + type: "array" + description: "transactional email forbidden sender for contact. Use only for\ + \ email Contact" + items: + type: "string" + format: "email" + updateBatchContacts: + type: "object" + properties: + contacts: + type: "array" + description: "List of contacts to be updated" + items: + $ref: "#/definitions/updateBatchContacts_contacts" + createAttribute: + type: "object" + properties: + value: + type: "string" + example: "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" + description: "Value of the attribute. Use only if the attribute's category\ + \ is 'calculated' or 'global'" + enumeration: + type: "array" + description: "List of values and labels that the attribute can take. Use only\ + \ if the attribute's category is \"category\". For example, [{\"value\"\ + :1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]" + items: + $ref: "#/definitions/createAttribute_enumeration" + type: + type: "string" + example: "text" + description: "Type of the attribute. Use only if the attribute's category\ + \ is 'normal', 'category' or 'transactional' ( type 'boolean' is only available\ + \ if the category is 'normal' attribute, type 'id' is only available if\ + \ the category is 'transactional' attribute & type 'category' is only available\ + \ if the category is 'category' attribute )" + enum: + - "text" + - "date" + - "float" + - "boolean" + - "id" + - "category" + updateAttribute: + type: "object" + properties: + value: + type: "string" + example: "COUNT[BLACKLISTED,BLACKLISTED,<,NOW()]" + description: "Value of the attribute to update. Use only if the attribute's\ + \ category is 'calculated' or 'global'" + enumeration: + type: "array" + description: "List of the values and labels that the attribute can take. Use\ + \ only if the attribute's category is \"category\". For example, [{\"value\"\ + :1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]" + items: + $ref: "#/definitions/updateAttribute_enumeration" + createList: + type: "object" + required: + - "folderId" + - "name" + properties: + name: + type: "string" + example: "Magento Customer - ES" + description: "Name of the list" + folderId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the parent folder in which this list is to be created" + ssoTokenRequest: + type: "object" + required: + - "id" + properties: + id: + type: "integer" + format: "int64" + example: 2333323 + description: "Id of the sub-account organization" + email: + type: "string" + example: "vipin+subaccount@sendinblue.com" + description: "User email of sub-account organization" + updateList: + type: "object" + properties: + name: + type: "string" + example: "Magento Customer - ES" + description: "Name of the list. Either of the two parameters (name, folderId)\ + \ can be updated at a time." + folderId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the folder in which the list is to be moved. Either of\ + \ the two parameters (name, folderId) can be updated at a time." + requestContactExport: + type: "object" + required: + - "customContactFilter" + properties: + exportAttributes: + type: "array" + description: "List of all the attributes that you want to export. These attributes\ + \ must be present in your contact database. For example, ['fname', 'lname',\ + \ 'email']." + items: + type: "string" + example: "NAME" + customContactFilter: + $ref: "#/definitions/requestContactExport_customContactFilter" + notifyUrl: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "Webhook that will be called once the export process is finished.\ + \ For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479" + requestContactImport: + type: "object" + properties: + fileUrl: + type: "string" + format: "url" + example: "https://importfile.domain.com" + description: "Mandatory if fileBody or jsonBody is not defined. URL of the\ + \ file to be imported (no local file). Possible file formats: .txt, .csv,\ + \ .json" + fileBody: + type: "string" + example: "NAME;SURNAME;EMAIL\nSmith;John;john.smith@example.com\nRoger;Ellie;ellie36@example.com" + description: "Mandatory if fileUrl and jsonBody is not defined. CSV content\ + \ to be imported. Use semicolon to separate multiple attributes. Maximum\ + \ allowed file body size is 10MB . However we recommend a safe limit of\ + \ around 8 MB to avoid the issues caused due to increase of file body size\ + \ while parsing. Please use fileUrl instead to import bigger files." + jsonBody: + type: "array" + description: "**Mandatory if fileUrl and fileBody is not defined.** JSON content\ + \ to be imported. **Maximum allowed json body size is 10MB** . However we\ + \ recommend a safe limit of around 8 MB to avoid the issues caused due to\ + \ increase of json body size while parsing. Please use fileUrl instead to\ + \ import bigger files.\n" + items: + type: "object" + example: + email: "ndicky0@ocn.ne.jp" + attributes: + LNAME: "Noemi" + FNAME: "Dicky" + COUNTRY: "DE" + BIRTHDAY: "11/02/1989" + PREFERED_COLOR: "BLACK" + description: "List of attributes to be imported" + minProperties: 1 + maxProperties: 2 + additionalProperties: {} + listIds: + type: "array" + description: "Mandatory if newList is not defined. Ids of the lists in which\ + \ the contacts shall be imported. For example, [2, 4, 7]." + items: + type: "integer" + format: "int64" + example: 76 + description: "List Id in which the contacts shall be imported" + notifyUrl: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "URL that will be called once the import process is finished.\ + \ For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479" + newList: + $ref: "#/definitions/requestContactImport_newList" + emailBlacklist: + type: "boolean" + example: false + description: "To blacklist all the contacts for email" + default: false + smsBlacklist: + type: "boolean" + example: false + description: "To blacklist all the contacts for sms" + default: false + updateExistingContacts: + type: "boolean" + example: true + description: "To facilitate the choice to update the existing contacts" + default: true + emptyContactsAttributes: + type: "boolean" + example: true + description: "To facilitate the choice to erase any attribute of the existing\ + \ contacts with empty value. emptyContactsAttributes = true means the empty\ + \ fields in your import will erase any attribute that currently contain\ + \ data in SendinBlue, & emptyContactsAttributes = false means the empty\ + \ fields will not affect your existing data ( only available if `updateExistingContacts`\ + \ set to true )" + default: false + createSmsCampaign: + type: "object" + required: + - "content" + - "name" + - "sender" + properties: + name: + type: "string" + example: "Spring Promo Code" + description: "Name of the campaign" + sender: + type: "string" + example: "MyShop" + description: "Name of the sender. **The number of characters is limited to\ + \ 11 for alphanumeric characters and 15 for numeric characters**" + maxLength: 15 + content: + type: "string" + example: "Get a discount by visiting our NY store and saying : Happy Spring\ + \ !" + description: "Content of the message. The maximum characters used per SMS\ + \ is 160, if used more than that, it will be counted as more than one SMS" + recipients: + $ref: "#/definitions/createSmsCampaign_recipients" + scheduledAt: + type: "string" + example: "2017-05-05T12:30:00+02:00" + description: "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ).\ + \ Prefer to pass your timezone in date-time format for accurate result." + unicodeEnabled: + type: "boolean" + example: true + description: "Format of the message. It indicates whether the content should\ + \ be treated as unicode or not." + default: false + updateSmsCampaign: + type: "object" + properties: + name: + type: "string" + example: "Spring Promo Code" + description: "Name of the campaign" + sender: + type: "string" + example: "MyShop" + description: "Name of the sender. **The number of characters is limited to\ + \ 11 for alphanumeric characters and 15 for numeric characters**" + maxLength: 15 + content: + type: "string" + example: "Get a discount by visiting our NY store and saying : Happy Spring!" + description: "Content of the message. The maximum characters used per SMS\ + \ is 160, if used more than that, it will be counted as more than one SMS" + recipients: + $ref: "#/definitions/createSmsCampaign_recipients" + scheduledAt: + type: "string" + example: "2017-05-05T12:30:00+02:00" + description: "UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ).\ + \ Prefer to pass your timezone in date-time format for accurate result." + unicodeEnabled: + type: "boolean" + example: true + description: "Format of the message. It indicates whether the content should\ + \ be treated as unicode or not." + default: false + sendTransacSms: + type: "object" + required: + - "content" + - "recipient" + - "sender" + properties: + sender: + type: "string" + example: "MyShop" + description: "Name of the sender. **The number of characters is limited to\ + \ 11 for alphanumeric characters and 15 for numeric characters**" + maxLength: 15 + recipient: + type: "string" + example: "33689965433" + description: "Mobile number to send SMS with the country code" + content: + type: "string" + example: "Enter this code:CCJJG8 to validate your account" + description: "Content of the message. If more than 160 characters long, will\ + \ be sent as multiple text messages" + type: + type: "string" + example: "marketing" + description: "Type of the SMS. Marketing SMS messages are those sent typically\ + \ with marketing content. Transactional SMS messages are sent to individuals\ + \ and are triggered in response to some action, such as a sign-up, purchase,\ + \ etc." + default: "transactional" + enum: + - "transactional" + - "marketing" + tag: + type: "string" + example: "accountValidation" + description: "Tag of the message" + webUrl: + type: "string" + format: "url" + example: "http://requestb.in/173lyyx1" + description: "Webhook to call for each event triggered by the message (delivered\ + \ etc.)" + unicodeEnabled: + type: "boolean" + example: true + description: "Format of the message. It indicates whether the content should\ + \ be treated as unicode or not." + default: false + sendTestEmail: + type: "object" + properties: + emailTo: + type: "array" + description: "List of the email addresses of the recipients whom you wish\ + \ to send the test mail. If left empty, the test mail will be sent to your\ + \ entire test list. You can not send more than 50 test emails per day." + items: + type: "string" + format: "email" + example: "helen.jurger@example.com" + description: "Email addres of the recipient" + sendTestSms: + type: "object" + properties: + phoneNumber: + type: "string" + example: "33689965433" + description: "Mobile number of the recipient with the country code. This number\ + \ must belong to one of your contacts in SendinBlue account and must not\ + \ be blacklisted" + getTransacAggregatedSmsReport: + type: "object" + properties: + range: + type: "string" + example: "2016-09-08|2017-04-06" + description: "Time frame of the report" + requests: + type: "integer" + format: "int64" + example: 263 + description: "Number of requests for the timeframe" + delivered: + type: "integer" + format: "int64" + example: 249 + description: "Number of delivered SMS for the timeframe" + hardBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of hardbounces for the timeframe" + softBounces: + type: "integer" + format: "int64" + example: 4 + description: "Number of softbounces for the timeframe" + blocked: + type: "integer" + format: "int64" + example: 2 + description: "Number of blocked contact for the timeframe" + unsubscribed: + type: "integer" + format: "int64" + example: 6 + description: "Number of unsubscription for the timeframe" + replied: + type: "integer" + format: "int64" + example: 12 + description: "Number of answered SMS for the timeframe" + accepted: + type: "integer" + format: "int64" + example: 252 + description: "Number of accepted for the timeframe" + rejected: + type: "integer" + format: "int64" + example: 8 + description: "Number of rejected for the timeframe" + getTransacSmsReport: + type: "object" + properties: + reports: + type: "array" + items: + $ref: "#/definitions/getTransacSmsReport_reports" + getIp: + type: "object" + required: + - "active" + - "domain" + - "id" + - "ip" + properties: + id: + type: "integer" + format: "int64" + example: 3 + description: "ID of the dedicated IP" + ip: + type: "string" + example: "123.65.8.22" + description: "Dedicated IP" + active: + type: "boolean" + example: true + description: "Status of the IP (true=active, false=inactive)" + domain: + type: "string" + example: "mailing.myshop.com" + description: "Domain associated to the IP" + getIpsFromSender: + type: "object" + required: + - "ips" + properties: + ips: + type: "array" + description: "Dedicated IP(s) linked to a sender" + items: + $ref: "#/definitions/getIpFromSender" + getIps: + type: "object" + required: + - "ips" + properties: + ips: + type: "array" + description: "Dedicated IP(s) available on your account" + items: + $ref: "#/definitions/getIp" + getIpFromSender: + type: "object" + required: + - "domain" + - "id" + - "ip" + - "weight" + properties: + id: + type: "integer" + format: "int64" + example: 3 + description: "ID of the dedicated IP" + ip: + type: "string" + example: "123.65.8.22" + description: "Dedicated IP" + domain: + type: "string" + example: "mailing.myshop.dom" + description: "Domain associated to the IP" + weight: + type: "integer" + format: "int64" + example: 75 + description: "Weight of the IP" + manageIp: + type: "object" + properties: + ip: + type: "string" + example: "123.65.8.22" + description: "Dedicated ID" + getTransacEmailContent: + type: "object" + required: + - "attachmentCount" + - "body" + - "date" + - "email" + - "events" + - "subject" + properties: + email: + type: "string" + format: "email" + example: "abc@example.com" + description: "Email address to which transactional email has been sent" + subject: + type: "string" + example: "Summer Camp" + description: "Subject of the sent email" + templateId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the template" + date: + type: "string" + example: "2017-03-12T12:30:00Z" + description: "Date on which transactional email was sent" + events: + type: "array" + description: "Series of events which occurred on the transactional email" + items: + $ref: "#/definitions/getTransacEmailContent_events" + body: + type: "string" + example: "

Greetings from the team

This\ + \ is the actual html content sent

" + description: "Actual content of the transactional email that has been sent" + attachmentCount: + type: "integer" + format: "int64" + example: 2 + description: "Count of the attachments that were sent in the email" + getTransacEmailsList: + type: "object" + properties: + count: + type: "integer" + format: "int64" + example: 5 + description: "Total number of transactional emails available on your account\ + \ according to the passed filter" + transactionalEmails: + type: "array" + items: + $ref: "#/definitions/getTransacEmailsList_transactionalEmails" + abTestVersionStats: + type: "object" + required: + - "Version A" + - "Version B" + properties: + Version A: + type: "string" + example: "50%" + description: "percentage of an event for version A" + Version B: + type: "string" + example: "50%" + description: "percentage of an event for version B" + description: "Percentage of a particular event for both versions" + abTestVersionClicks: + type: "array" + description: "Information on clicked links for a particular version" + items: + $ref: "#/definitions/abTestVersionClicks_inner" + blockDomain: + type: "object" + required: + - "domain" + properties: + domain: + type: "string" + example: "example.com" + description: "name of the domain to be blocked" + getBlockedDomains: + type: "object" + required: + - "domains" + properties: + domains: + type: "array" + description: "List of all blocked domains" + items: + type: "string" + example: "contact.com" + description: "name of blocked domain" + description: "list of blocked domains" + getInboundEmailEvents: + type: "object" + properties: + events: + type: "array" + items: + $ref: "#/definitions/getInboundEmailEvents_events" + getInboundEmailEventsByUuid: + type: "object" + properties: + receivedAt: + type: "string" + format: "date-time" + example: "2019-05-25T11:53:26Z" + description: "Date when email was received on SMTP relay" + deliveredAt: + type: "string" + format: "date-time" + description: "Date when email was delivered successfully to client’s webhook" + recipient: + type: "string" + format: "email" + description: "Recipient’s email address" + sender: + type: "string" + format: "email" + description: "Sender’s email address" + messageId: + type: "string" + description: "Value of the Message-ID header. This will be present only after\ + \ the processing is done." + subject: + type: "string" + description: "Value of the Subject header. This will be present only after\ + \ the processing is done. " + attachments: + type: "array" + description: "List of attachments of the email. This will be present only\ + \ after the processing is done." + items: + $ref: "#/definitions/getInboundEmailEventsByUuid_attachments" + logs: + type: "array" + description: "List of events/logs that describe the lifecycle of the email\ + \ on SIB platform" + items: + $ref: "#/definitions/getInboundEmailEventsByUuid_logs" + getScheduledEmailByBatchId: + type: "object" + properties: + count: + type: "integer" + description: "Total number of batches" + batches: + type: "array" + items: + $ref: "#/definitions/getScheduledEmailByBatchId_batches" + getScheduledEmailByMessageId: + type: "object" + required: + - "createdAt" + - "scheduledAt" + - "status" + properties: + scheduledAt: + type: "string" + format: "date-time" + description: "Datetime for which the email was scheduled" + createdAt: + type: "string" + format: "date-time" + description: "Datetime on which the email was scheduled" + status: + type: "string" + description: "Current status of the scheduled email" + enum: + - "inProgress" + - "queued" + - "processed" + - "error" + subAccountsResponse: + type: "object" + properties: + count: + type: "integer" + description: "Total number of subaccounts" + subAccounts: + type: "array" + items: + $ref: "#/definitions/subAccountsResponse_subAccounts" + createSubAccount: + type: "object" + required: + - "companyName" + - "email" + properties: + companyName: + type: "string" + description: "Set the name of the sub-account company" + email: + type: "string" + description: "Email address for the organization" + language: + type: "string" + description: "Set the language of the sub-account" + enum: + - "en" + - "fr" + - "it" + - "es" + - "pt" + - "de" + timezone: + type: "string" + description: "Set the timezone of the sub-account" + example: + companyName: "Test Sub-account" + email: "test-sub@example.com" + timezone: "Europe/Paris" + language: "fr" + createSubAccountResponse: + type: "object" + required: + - "id" + properties: + id: + type: "integer" + format: "int64" + example: 122 + description: "ID of the sub-account created" + masterDetailsResponse: + type: "object" + properties: + email: + type: "string" + description: "Email id of master account" + companyName: + type: "string" + description: "Company name of master account organization" + id: + type: "integer" + format: "int64" + description: "Unique identifier of the master account organization" + currencyCode: + type: "string" + description: "Currency code of the master account organization" + timezone: + type: "string" + description: "Timezone of the master account organization" + billingInfo: + $ref: "#/definitions/masterDetailsResponse_billingInfo" + planInfo: + $ref: "#/definitions/masterDetailsResponse_planInfo" + subAccountDetailsResponse: + type: "object" + properties: + name: + type: "string" + description: "Name of the sub-account user" + email: + type: "string" + description: "Email id of the sub-account organization" + companyName: + type: "string" + description: "Sub-account company name" + planInfo: + $ref: "#/definitions/subAccountDetailsResponse_planInfo" + subAccountUpdatePlanRequest: + type: "object" + properties: + credits: + $ref: "#/definitions/subAccountUpdatePlanRequest_credits" + features: + $ref: "#/definitions/subAccountUpdatePlanRequest_features" + description: "Details of the plan to be changed" + TaskTypes: + type: "object" + properties: + id: + type: "string" + example: "61a88a2eb7a574180261234" + description: "Id of task type" + title: + type: "string" + example: "Email" + description: "Title of task type" + description: "Task types details" + example: + id: "61a88a2eb7a574180261234" + title: "Email" + Task: + type: "object" + required: + - "name" + - "taskTypeId" + properties: + id: + type: "string" + example: "61a5cd07ca1347c82306ad06" + description: "Unique task id" + taskTypeId: + type: "string" + example: "61a5cd07ca1347c82306ad09" + description: "Id for type of task e.g Call / Email / Meeting etc." + name: + type: "string" + example: "Task: Connect with client" + description: "Name of task" + contactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids for contacts linked to this task" + items: + type: "integer" + dealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Deal ids for deals a task is linked to" + items: + type: "string" + companiesIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Companies ids for companies a task is linked to" + items: + type: "string" + description: "Task Details" + example: + taskTypeId: "61a5cd07ca1347c82306ad09" + name: "Task: Connect with client" + contactsIds: + - 1 + - 2 + - 3 + dealsIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + id: "61a5cd07ca1347c82306ad06" + companiesIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + TaskReminder: + type: "object" + required: + - "types" + - "unit" + - "value" + properties: + value: + type: "integer" + example: 10 + description: "Value of time unit before reminder is to be sent" + unit: + type: "string" + description: "Unit of time before reminder is to be sent" + enum: + - "minutes" + - "hours" + - "weeks" + - "days" + types: + type: "array" + example: + - "email" + description: "Type of task reminder e.g email, push" + items: + type: "string" + description: "Task reminder date/time for a task" + NoteData: + type: "object" + required: + - "text" + properties: + text: + type: "string" + example: "In communication with client for resolution of queries." + description: "Text content of a note" + minLength: 1 + maxLength: 3000 + contactIds: + type: "array" + example: + - 247 + - 1 + - 2 + description: "Contact Ids linked to a note" + items: + type: "integer" + dealIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + description: "Deal Ids linked to a note" + items: + type: "string" + description: "Note data to be saved" + example: + text: "In communication with client for resolution of queries." + dealIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + contactIds: + - 247 + - 1 + - 2 + Note: + type: "object" + required: + - "text" + properties: + id: + type: "string" + example: "61a5cd07ca1347c82306ad09" + description: "Unique note Id" + text: + type: "string" + example: "In communication with client for resolution of queries." + description: "Text content of a note" + minLength: 1 + maxLength: 3000 + contactIds: + type: "array" + example: + - 247 + - 1 + - 2 + description: "Contact ids linked to a note" + items: + type: "integer" + dealIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + description: "Deal ids linked to a note" + items: + type: "string" + authorId: + type: "object" + example: + id: "61a5ce58y5d4795761045991" + email: "johndoe@example.com" + locale: "en_GB" + timezone: "Asia/Kolkata" + name: + fullName: "John Doe" + description: "Account details of user which created the note" + properties: {} + createdAt: + type: "string" + format: "date-time" + example: "2017-05-01T17:05:03.000Z" + description: "Note created date/time" + updatedAt: + type: "string" + format: "date-time" + example: "2017-05-01T17:05:03.000Z" + description: "Note updated date/time" + description: "Note Details" + example: + createdAt: "2017-05-01T17:05:03.000Z" + id: "61a5cd07ca1347c82306ad09" + text: "In communication with client for resolution of queries." + authorId: + id: "61a5ce58y5d4795761045991" + email: "johndoe@example.com" + locale: "en_GB" + timezone: "Asia/Kolkata" + name: + fullName: "John Doe" + dealIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + contactIds: + - 247 + - 1 + - 2 + updatedAt: "2017-05-01T17:05:03.000Z" + NoteId: + type: "object" + properties: + id: + type: "string" + example: "61a5cd07ca1347c82306ad09" + description: "Unique note Id" + description: "Updated Note ID" + example: + id: "61a5cd07ca1347c82306ad09" + NoteList: + type: "array" + description: "List of notes" + items: + $ref: "#/definitions/Note" + TaskList: + type: "object" + properties: + items: + type: "array" + description: "List of tasks" + items: + $ref: "#/definitions/Task" + description: "List of tasks" + example: + items: + - taskTypeId: "61a5cd07ca1347c82306ad09" + name: "Task: Connect with client" + contactsIds: + - 1 + - 2 + - 3 + dealsIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + id: "61a5cd07ca1347c82306ad06" + companiesIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + - taskTypeId: "61a5cd07ca1347c82306ad09" + name: "Task: Connect with client" + contactsIds: + - 1 + - 2 + - 3 + dealsIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + id: "61a5cd07ca1347c82306ad06" + companiesIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + PipelineStage: + type: "object" + properties: + id: + type: "string" + example: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + description: "Stage id" + name: + type: "string" + example: "New" + description: "Stage name" + description: "List of stages" + example: + name: "New" + id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + Pipeline: + type: "object" + properties: + stages: + type: "array" + description: "List of stages" + items: + $ref: "#/definitions/PipelineStage" + description: "List of stages" + example: + stages: + - name: "New" + id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + - name: "New" + id: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + DealAttributes: + type: "array" + description: "List of deal attributes" + items: + $ref: "#/definitions/DealAttributes_inner" + DealsList: + type: "object" + properties: + items: + type: "array" + description: "List of deals" + items: + $ref: "#/definitions/Deal" + description: "List of Deals" + example: + items: + - linkedCompaniesIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + linkedContactsIds: + - 1 + - 2 + - 3 + attributes: + deal_name: "testname" + deal_owner: "6093d2425a9b436e9519d034" + amount: 12 + pipeline: "6093d296ad1e9c5cf2140a58" + deal_stage: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + stage_updated_at: "2022-05-30T07:42:05.671Z" + created_at: "2022-05-30T07:42:05.671Z" + number_of_contacts: 1 + last_updated_date: "2022-06-06T08:38:36.761Z" + last_activity_date: "2022-06-06T08:38:36.000Z" + number_of_activities: 0 + id: "629475917295261d9b1f4403" + - linkedCompaniesIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + linkedContactsIds: + - 1 + - 2 + - 3 + attributes: + deal_name: "testname" + deal_owner: "6093d2425a9b436e9519d034" + amount: 12 + pipeline: "6093d296ad1e9c5cf2140a58" + deal_stage: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + stage_updated_at: "2022-05-30T07:42:05.671Z" + created_at: "2022-05-30T07:42:05.671Z" + number_of_contacts: 1 + last_updated_date: "2022-06-06T08:38:36.761Z" + last_activity_date: "2022-06-06T08:38:36.000Z" + number_of_activities: 0 + id: "629475917295261d9b1f4403" + Deal: + type: "object" + properties: + id: + type: "string" + example: "629475917295261d9b1f4403" + description: "Unique deal id" + attributes: + type: "object" + example: + deal_name: "testname" + deal_owner: "6093d2425a9b436e9519d034" + amount: 12 + pipeline: "6093d296ad1e9c5cf2140a58" + deal_stage: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + stage_updated_at: "2022-05-30T07:42:05.671Z" + created_at: "2022-05-30T07:42:05.671Z" + number_of_contacts: 1 + last_updated_date: "2022-06-06T08:38:36.761Z" + last_activity_date: "2022-06-06T08:38:36.000Z" + number_of_activities: 0 + description: "Deal attributes with values" + properties: {} + linkedContactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids for contacts linked to this deal" + items: + type: "integer" + linkedCompaniesIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Companies ids for companies linked to this deal" + items: + type: "string" + description: "Deal Details" + example: + linkedCompaniesIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + linkedContactsIds: + - 1 + - 2 + - 3 + attributes: + deal_name: "testname" + deal_owner: "6093d2425a9b436e9519d034" + amount: 12 + pipeline: "6093d296ad1e9c5cf2140a58" + deal_stage: "9e577ff7-8e42-4ab3-be26-2b5e01b42518" + stage_updated_at: "2022-05-30T07:42:05.671Z" + created_at: "2022-05-30T07:42:05.671Z" + number_of_contacts: 1 + last_updated_date: "2022-06-06T08:38:36.761Z" + last_activity_date: "2022-06-06T08:38:36.000Z" + number_of_activities: 0 + id: "629475917295261d9b1f4403" + CompaniesList: + type: "object" + properties: + items: + type: "array" + description: "List of compaies" + items: + $ref: "#/definitions/Company" + description: "List of comapnies" + example: + items: + - linkedDealsIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + linkedContactsIds: + - 1 + - 2 + - 3 + attributes: + created_at: "2022-01-13T19:04:24.376+05:30" + domain: "xyz" + last_updated_at: "2022-04-01T18:47:48.283+05:30" + name: "text" + number_of_contacts: 0 + owner: "62260474111b1101704a9d85" + owner_assign_date: "2022-04-01T18:21:13.379+05:30" + phone_number: 8171844192 + revenue: 10 + id: "629475917295261d9b1f4403" + - linkedDealsIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + linkedContactsIds: + - 1 + - 2 + - 3 + attributes: + created_at: "2022-01-13T19:04:24.376+05:30" + domain: "xyz" + last_updated_at: "2022-04-01T18:47:48.283+05:30" + name: "text" + number_of_contacts: 0 + owner: "62260474111b1101704a9d85" + owner_assign_date: "2022-04-01T18:21:13.379+05:30" + phone_number: 8171844192 + revenue: 10 + id: "629475917295261d9b1f4403" + Company: + type: "object" + properties: + id: + type: "string" + example: "629475917295261d9b1f4403" + description: "Unique company id" + attributes: + type: "object" + example: + created_at: "2022-01-13T19:04:24.376+05:30" + domain: "xyz" + last_updated_at: "2022-04-01T18:47:48.283+05:30" + name: "text" + number_of_contacts: 0 + owner: "62260474111b1101704a9d85" + owner_assign_date: "2022-04-01T18:21:13.379+05:30" + phone_number: 8171844192 + revenue: 10 + description: "Company attributes with values" + properties: {} + linkedContactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids for contacts linked to this company" + items: + type: "integer" + linkedDealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Deals ids for companies linked to this company" + items: + type: "string" + description: "Company Details" + example: + linkedDealsIds: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + linkedContactsIds: + - 1 + - 2 + - 3 + attributes: + created_at: "2022-01-13T19:04:24.376+05:30" + domain: "xyz" + last_updated_at: "2022-04-01T18:47:48.283+05:30" + name: "text" + number_of_contacts: 0 + owner: "62260474111b1101704a9d85" + owner_assign_date: "2022-04-01T18:21:13.379+05:30" + phone_number: 8171844192 + revenue: 10 + id: "629475917295261d9b1f4403" + CompanyAttributes: + type: "array" + description: "List of company attributes" + items: + $ref: "#/definitions/CompanyAttributes_inner" + body: + type: "object" + required: + - "name" + properties: + name: + type: "string" + example: "Deal: Connect with company" + description: "Name of deal" + attributes: + type: "object" + example: + deal_owner: "6093d2425a9b436e9519d034" + amount: 12 + description: "Attributes fo\\r deal creation" + properties: {} + inline_response_201: + type: "object" + required: + - "id" + properties: + id: + type: "string" + example: "61a5cd07ca1347c82306ad06" + description: "Unique deal id" + description: "Created deal id" + example: + id: "61a5cd07ca1347c82306ad06" + body_1: + type: "object" + properties: + name: + type: "string" + example: "Deal: Connect with client" + description: "Name of deal" + attributes: + type: "object" + example: + deal_owner: "6093d2425a9b436e9519d034" + amount: 12 + description: "Attributes for deal update" + properties: {} + body_2: + type: "object" + required: + - "name" + properties: + name: + type: "string" + example: "company" + description: "Name of company" + attributes: + type: "object" + example: + domain: "https://example.com" + industry: "Fabric" + owner: "60e68d60582a3b006f524197" + description: "Attributes for company creation" + properties: {} + inline_response_200: + type: "object" + required: + - "id" + properties: + id: + type: "string" + example: "61a5cd07ca1347c82306ad06" + description: "Unique company id" + description: "Created company id" + example: + id: "61a5cd07ca1347c82306ad06" + body_3: + type: "object" + properties: + name: + type: "string" + example: "company" + description: "Name of company" + attributes: + type: "object" + example: + category: "label_2" + domain: "xyz" + date: "2022-05-04T00:00:00+05:30" + industry: "flipkart" + number_of_contacts: 1 + number_of_employees: 100 + owner: "5b1a17d914b73d35a76ca0c7" + phone_number: "81718441912" + revenue: 10000.34222 + description: "Attributes for company update" + properties: {} + body_4: + type: "object" + properties: + linkContactIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids for contacts to be linked with company" + items: + type: "integer" + unlinkContactIds: + type: "array" + example: + - 4 + - 5 + - 6 + description: "Contact ids for contacts to be unlinked from company" + items: + type: "integer" + linkDealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Deals ids for deals to be linked with company" + items: + type: "string" + unlinkDealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045994" + - "61a5ce58c5d479576104595" + - "61a5ce58c5d4795761045996" + description: "Deals ids for deals to be unlinked from company" + items: + type: "string" + body_5: + type: "object" + required: + - "date" + - "name" + - "taskTypeId" + properties: + name: + type: "string" + example: "Task: Connect with client" + description: "Name of task" + duration: + type: "integer" + format: "int64" + example: 600000 + description: "Duration of task in milliseconds [1 minute = 60000 ms]" + minimum: 0 + taskTypeId: + type: "string" + example: "61a5cd07ca1347c82306ad09" + description: "Id for type of task e.g Call / Email / Meeting etc." + date: + type: "string" + format: "date-time" + example: "2021-11-01T17:44:54.668Z" + description: "Task due date and time" + notes: + type: "string" + example: "In communication with client for resolution of queries." + description: "Notes added to a task" + done: + type: "boolean" + example: false + description: "Task marked as done" + assignToId: + type: "string" + example: "5faab4b7f195bb3c4c31e62a" + description: "User id to whom task is assigned" + contactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids for contacts linked to this task" + items: + type: "integer" + dealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Deal ids for deals a task is linked to" + items: + type: "string" + companiesIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Companies ids for companies a task is linked to" + items: + type: "string" + reminder: + $ref: "#/definitions/TaskReminder" + inline_response_201_1: + type: "object" + required: + - "id" + properties: + id: + type: "string" + example: "61a5cd07ca1347c82306ad06" + description: "Unique task id" + description: "Task Details" + example: + id: "61a5cd07ca1347c82306ad06" + body_6: + type: "object" + properties: + name: + type: "string" + example: "Task: Connect with client" + description: "Name of task" + duration: + type: "integer" + example: 600000 + description: "Duration of task in milliseconds [1 minute = 60000 ms]" + taskTypeId: + type: "string" + example: "61a5cd07ca1347c82306ad09" + description: "Id for type of task e.g Call / Email / Meeting etc." + date: + type: "string" + format: "date-time" + example: "2021-11-01T17:44:54.668Z" + description: "Task date/time" + notes: + type: "string" + example: "In communication with client for resolution of queries." + description: "Notes added to a task" + done: + type: "boolean" + example: false + description: "Task marked as done" + assignToId: + type: "string" + example: "5faab4b7f195bb3c4c31e62a" + description: "User id to whom task is assigned" + contactsIds: + type: "array" + example: + - 1 + - 2 + - 3 + description: "Contact ids for contacts linked to this task" + items: + type: "integer" + dealsIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Deal ids for deals a task is linked to" + items: + type: "string" + companiesIds: + type: "array" + example: + - "61a5ce58c5d4795761045990" + - "61a5ce58c5d4795761045991" + - "61a5ce58c5d4795761045992" + description: "Companies ids for companies a task is linked to" + items: + type: "string" + getAccount_plan: + type: "object" + required: + - "credits" + - "creditsType" + - "type" + properties: + type: + type: "string" + example: "subscription" + description: "Displays the plan type of the user" + enum: + - "payAsYouGo" + - "free" + - "subscription" + - "sms" + - "reseller" + creditsType: + type: "string" + example: "sendLimit" + description: "This is the type of the credit, \"Send Limit\" is one of the\ + \ possible types of credit of a user. \"Send Limit\" implies the total number\ + \ of emails you can send to the subscribers in your account." + enum: + - "sendLimit" + credits: + type: "number" + format: "float" + example: 8755.0 + description: "Remaining credits of the user" + startDate: + type: "string" + format: "date" + example: "2016-12-31" + description: "Date of the period from which the plan will start (only available\ + \ for \"subscription\" and \"reseller\" plan type)" + endDate: + type: "string" + format: "date" + example: "2017-01-31" + description: "Date of the period from which the plan will end (only available\ + \ for \"subscription\" and \"reseller\" plan type)" + userLimit: + type: "integer" + example: 10 + description: "Only in case of reseller account. It implies the total number\ + \ of child accounts you can add to your account." + getAccount_relay_data: + type: "object" + required: + - "port" + - "relay" + - "userName" + properties: + userName: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Email to use as login on transactional platform" + relay: + type: "string" + example: "relay.domain.com" + description: "URL of the SMTP Relay" + port: + type: "integer" + example: 125 + description: "Port used for SMTP Relay" + description: "Data regarding the transactional email account" + getAccount_relay: + type: "object" + required: + - "data" + - "enabled" + properties: + enabled: + type: "boolean" + example: true + description: "Status of your transactional email Account (true=Enabled, false=Disabled)" + data: + $ref: "#/definitions/getAccount_relay_data" + description: "Information about your transactional email account" + getAccount_marketingAutomation: + type: "object" + required: + - "enabled" + properties: + key: + type: "string" + example: "iso05aopqych87ysy0jymf" + description: "Marketing Automation Tracker ID" + enabled: + type: "boolean" + example: false + description: "Status of Marketing Automation Plateform activation for your\ + \ account (true=enabled, false=disabled)" + getChildInfo_credits: + type: "object" + properties: + emailCredits: + type: "integer" + format: "int64" + example: 98555 + description: "Email credits available for your child" + smsCredits: + type: "integer" + format: "int64" + example: 87556 + description: "SMS credits available for your child" + description: "Credits available for your child" + getChildInfo_statistics: + type: "object" + properties: + previousMonthTotalSent: + type: "integer" + format: "int64" + example: 7654 + description: "Overall emails sent for the previous month" + currentMonthTotalSent: + type: "integer" + format: "int64" + example: 4566 + description: "Overall emails sent for current month" + totalSent: + type: "integer" + format: "int64" + example: 987554 + description: "Overall emails sent for since the account exists" + description: "Statistics about your child account activity" + getChildInfo_apiKeys_v2: + type: "object" + required: + - "key" + - "name" + properties: + name: + type: "string" + example: "N˚2" + description: "Name of the key for version 2" + key: + type: "string" + example: "nOpxxxxxy7z" + description: "API Key for version 2" + getChildInfo_apiKeys_v3: + type: "object" + required: + - "key" + - "name" + properties: + name: + type: "string" + example: "N˚3" + description: "Name of the key for version 3" + key: + type: "string" + example: "xkeysib-21881axxxxxcc92e04-mIrexxxx7z" + description: "API Key for version 3" + getChildInfo_apiKeys: + type: "object" + required: + - "v2" + properties: + v2: + type: "array" + items: + $ref: "#/definitions/getChildInfo_apiKeys_v2" + v3: + type: "array" + items: + $ref: "#/definitions/getChildInfo_apiKeys_v3" + description: "API Keys associated to child account" + getExtendedClient_address: + type: "object" + required: + - "city" + - "country" + - "street" + - "zipCode" + properties: + street: + type: "string" + example: "47 Harbour Street" + description: "Street information" + city: + type: "string" + example: "New-York" + description: "City information" + zipCode: + type: "string" + example: "9867" + description: "Zip Code information" + country: + type: "string" + example: "United States of America" + description: "Country information" + description: "Address informations" + getSendersList_ips: + type: "object" + required: + - "domain" + - "ip" + - "weight" + properties: + ip: + type: "string" + example: "123.98.689.7" + description: "Dedicated IP available in your account" + domain: + type: "string" + example: "mycompany.com" + description: "Domain of the IP" + weight: + type: "integer" + format: "int64" + example: 50 + description: "Weight of the IP for this sender" + getSendersList_senders: + type: "object" + required: + - "active" + - "email" + - "id" + - "name" + properties: + id: + type: "integer" + format: "int64" + example: 0 + description: "Id of the sender" + name: + type: "string" + example: "Marketing" + description: "From Name associated to the sender" + email: + type: "string" + example: "marketing@mycompany.com" + description: "From Email associated to the sender" + active: + type: "boolean" + example: false + description: "Status of sender (true=activated, false=deactivated)" + ips: + type: "array" + description: "List of dedicated IP(s) available in the account. This data\ + \ is displayed only for dedicated IPs" + items: + $ref: "#/definitions/getSendersList_ips" + createSender_ips: + type: "object" + required: + - "domain" + - "ip" + properties: + ip: + type: "string" + example: "123.98.689.7" + description: "Dedicated IP available in your account" + domain: + type: "string" + example: "mycompany.com" + description: "Domain of the IP" + weight: + type: "integer" + format: "int64" + example: 50 + description: "Weight to apply to the IP. Sum of all IP weights must be 100.\ + \ Should be passed for either ALL or NONE of the IPs. If it's not passed,\ + \ the sending will be equally balanced on all IPs." + minimum: 1 + maximum: 100 + remainingCreditModel_child: + type: "object" + required: + - "email" + - "sms" + properties: + sms: + type: "number" + format: "double" + example: 500.0 + description: "SMS Credits remaining for child account" + email: + type: "number" + format: "double" + example: 2000.0 + description: "Email Credits remaining for child account" + description: "Credits remaining for child account" + remainingCreditModel_reseller: + type: "object" + required: + - "email" + - "sms" + properties: + sms: + type: "number" + format: "double" + example: 12900.0 + description: "SMS Credits remaining for reseller account" + email: + type: "number" + format: "double" + example: 2000000.0 + description: "Email Credits remaining for reseller account" + getExtendedCampaignOverview_sender: + type: "object" + properties: + name: + type: "string" + example: "Marketing" + description: "Sender name of the campaign" + email: + type: "string" + format: "email" + example: "marketing@mycompany.com" + description: "Sender email of the campaign" + id: + type: "string" + example: "43" + description: "Sender id of the campaign" + postContactInfo_contacts: + type: "object" + properties: + success: + type: "array" + items: + type: "string" + format: "email" + example: "jeff32@example.com, jim56@example.com" + description: "Email addresses which are successfully imported" + failure: + type: "array" + items: + type: "string" + format: "email" + example: "jeff32@example.com, jim56@example.com" + description: "Email addresses which can not be imported, could be already\ + \ in/out list and/or doesn't exist" + total: + type: "integer" + format: "int64" + example: 27 + description: "Displays the count of total number of contacts removed from\ + \ list when user opts for \"all\" option." + processId: + type: "integer" + format: "int64" + example: 78 + description: "Id of the process created to remove contacts from list when\ + \ user opts for \"all\" option." + example: + total: 27 + processId: 78 + success: + - "jeff32@example.com, jim56@example.com" + - "jeff32@example.com, jim56@example.com" + failure: + - "jeff32@example.com, jim56@example.com" + - "jeff32@example.com, jim56@example.com" + getTransacBlockedContacts_reason: + type: "object" + properties: + code: + type: "string" + example: "AdminBlocked" + description: "Reason code for blocking / unsubscribing (This code is safe\ + \ for comparison)" + enum: + - "unsubscribedViaMA" + - "unsubscribedViaEmail" + - "adminBlocked" + - "unsubscribedViaApi" + - "hardBounce" + - "contactFlaggedAsSpam" + message: + type: "string" + example: "Admin blocked" + description: "Reason for blocking / unsubscribing (This string is not safe\ + \ for comparison)" + description: "Reason for blocking / unsubscribing" + example: "\"Admin blocked\"" + getTransacBlockedContacts_contacts: + type: "object" + required: + - "blockedAt" + - "email" + - "reason" + - "senderEmail" + properties: + email: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Email address of the blocked or unsubscribed contact" + senderEmail: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Sender email address of the blocked or unsubscribed contact" + reason: + $ref: "#/definitions/getTransacBlockedContacts_reason" + blockedAt: + type: "string" + example: "2017-05-01T12:30:00Z" + description: "Date when the contact was blocked or unsubscribed on" + getReports_reports: + type: "object" + required: + - "blocked" + - "clicks" + - "date" + - "delivered" + - "hardBounces" + - "invalid" + - "opens" + - "requests" + - "softBounces" + - "spamReports" + - "uniqueClicks" + - "uniqueOpens" + - "unsubscribed" + properties: + date: + type: "string" + format: "date" + example: "2017-04-06" + description: "Date of the statistics" + requests: + type: "integer" + format: "int64" + example: 65 + description: "Number of requests for the date" + delivered: + type: "integer" + format: "int64" + example: 63 + description: "Number of delivered emails for the date" + hardBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of hardbounces for the date" + softBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of softbounces for the date" + clicks: + type: "integer" + format: "int64" + example: 6 + description: "Number of clicks for the date" + uniqueClicks: + type: "integer" + format: "int64" + example: 5 + description: "Number of unique clicks for the date" + opens: + type: "integer" + format: "int64" + example: 58 + description: "Number of openings for the date" + uniqueOpens: + type: "integer" + format: "int64" + example: 52 + description: "Number of unique openings for the date" + spamReports: + type: "integer" + format: "int64" + example: 0 + description: "Number of complaints (spam reports) for the date" + blocked: + type: "integer" + format: "int64" + example: 0 + description: "Number of blocked emails for the date" + invalid: + type: "integer" + format: "int64" + example: 0 + description: "Number of invalid emails for the date" + unsubscribed: + type: "integer" + format: "int64" + example: 0 + description: "Number of unsubscribed emails for the date" + getEmailEventReport_events: + type: "object" + required: + - "date" + - "email" + - "event" + - "messageId" + properties: + email: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Email address which generates the event" + date: + type: "string" + example: "2017-03-12T12:30:00Z" + description: "UTC date-time on which the event has been generated" + subject: + type: "string" + example: "Sib client test" + description: "Subject of the event" + messageId: + type: "string" + example: "<201798300811.5787683@relay.domain.com>" + description: "Message ID which generated the event" + event: + type: "string" + example: "delivered" + description: "Event which occurred" + enum: + - "bounces" + - "hardBounces" + - "softBounces" + - "delivered" + - "spam" + - "requests" + - "opened" + - "clicks" + - "invalid" + - "deferred" + - "blocked" + - "unsubscribed" + - "error" + - "loadedByProxy" + reason: + type: "string" + example: "Error connection timeout" + description: "Reason of bounce (only available if the event is hardbounce\ + \ or softbounce)" + tag: + type: "string" + example: "OrderConfirmation" + description: "Tag of the email which generated the event" + ip: + type: "string" + example: "165.87.3.15" + description: "IP from which the user has opened the email or clicked on the\ + \ link (only available if the event is opened or clicks)" + link: + type: "string" + example: "https://www.someexamplelink.com" + description: "The link which is sent to the user (only available if the event\ + \ is requests or opened or clicks)" + from: + type: "string" + format: "email" + example: "john@example.com" + description: "Sender email from which the emails are sent" + templateId: + type: "integer" + format: "int64" + example: 4 + description: "ID of the template (only available if the email is template\ + \ based)" + getSmsEventReport_events: + type: "object" + properties: + phoneNumber: + type: "string" + example: "00189001094" + description: "Phone number which has generated the event" + date: + type: "string" + example: "2017-03-12T12:30:00Z" + description: "UTC date-time on which the event has been generated" + messageId: + type: "string" + example: "1472640582425378" + description: "Message ID which generated the event" + event: + type: "string" + example: "accepted" + description: "Event which occurred" + enum: + - "bounces" + - "hardBounces" + - "softBounces" + - "delivered" + - "sent" + - "accepted" + - "unsubscription" + - "replies" + - "blocked" + reason: + type: "string" + example: "Message is undeliverable due to an incorrect / invalid / blacklisted\ + \ / permanently barred MSISDN for this operator" + description: "Reason of bounce (only available if the event is hardbounce\ + \ or softbounce)" + reply: + type: "string" + tag: + type: "string" + example: "CabWaiting" + description: "Tag of the SMS which generated the event" + getSmtpTemplateOverview_sender: + type: "object" + properties: + name: + type: "string" + example: "Mary form MyShop" + description: "From email for the template" + email: + type: "string" + format: "email" + example: "contact@myshop.fr" + description: "From email for the template" + id: + type: "string" + example: "43" + description: "Sender id of the template" + getExtendedContactDetails_statistics_messagesSent: + type: "object" + required: + - "campaignId" + - "eventTime" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + eventTime: + type: "string" + example: "2017-03-12T20:15:13Z" + description: "UTC date-time of the event" + getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription: + type: "object" + required: + - "campaignId" + - "eventTime" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + eventTime: + type: "string" + example: "2017-03-12T20:15:13Z" + description: "UTC date-time of the event" + ip: + type: "string" + example: "165.87.3.15" + description: "IP from which the user has unsubscribed" + getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription: + type: "object" + required: + - "eventTime" + properties: + eventTime: + type: "string" + example: "2017-03-12T20:15:13Z" + description: "UTC date-time of the event" + ip: + type: "string" + example: "165.87.3.15" + description: "IP from which the user has been unsubscribed" + getExtendedContactDetails_statistics_unsubscriptions: + type: "object" + required: + - "adminUnsubscription" + - "userUnsubscription" + properties: + userUnsubscription: + type: "array" + description: "Contact unsubscribe via unsubscription link in a campaign" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription" + adminUnsubscription: + type: "array" + description: "Contact has been unsubscribed from the administrator" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription" + description: "Listing of the unsubscription for the contact" + getExtendedContactDetails_statistics_opened: + type: "object" + required: + - "campaignId" + - "count" + - "eventTime" + - "ip" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + count: + type: "integer" + format: "int64" + example: 1 + description: "Number of openings for the campaign" + eventTime: + type: "string" + example: "2017-03-12T20:15:13Z" + description: "UTC date-time of the event" + ip: + type: "string" + example: "165.87.3.15" + description: "IP from which the user has opened the email" + getExtendedContactDetails_statistics_links: + type: "object" + required: + - "count" + - "eventTime" + - "ip" + - "url" + properties: + count: + type: "integer" + format: "int64" + example: 1 + description: "Number of clicks on this link for the campaign" + eventTime: + type: "string" + example: "2017-03-12T20:15:13Z" + description: "UTC date-time of the event" + ip: + type: "string" + example: "165.87.3.15" + description: "IP from which the user has clicked on the link" + url: + type: "string" + example: "www.myshop.com" + description: "URL of the clicked link" + getExtendedContactDetails_statistics_clicked: + type: "object" + required: + - "campaignId" + - "links" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + links: + type: "array" + description: "Listing of the clicked links for the campaign" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_links" + getExtendedContactDetails_statistics_delivered: + type: "object" + required: + - "campaignId" + - "eventTime" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + eventTime: + type: "string" + example: "2017-03-12T20:15:13.000+0000" + description: "UTC date-time of the event" + getExtendedContactDetails_statistics: + type: "object" + properties: + messagesSent: + type: "array" + description: "Listing of the sent campaign for the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + hardBounces: + type: "array" + description: "Listing of the hardbounes generated by the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + softBounces: + type: "array" + description: "Listing of the softbounes generated by the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + complaints: + type: "array" + description: "Listing of the complaints generated by the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_messagesSent" + unsubscriptions: + $ref: "#/definitions/getExtendedContactDetails_statistics_unsubscriptions" + opened: + type: "array" + description: "Listing of the openings generated by the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_opened" + clicked: + type: "array" + description: "Listing of the clicks generated by the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_clicked" + transacAttributes: + type: "array" + description: "Listing of the transactional attributes for the contact" + items: + type: "object" + properties: {} + delivered: + type: "array" + description: "Listing of the delivered campaign for the contact" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_delivered" + description: "Campaign statistics of the contact" + getContactCampaignStats_unsubscriptions: + type: "object" + required: + - "adminUnsubscription" + - "userUnsubscription" + properties: + userUnsubscription: + type: "array" + description: "Contact has unsubscribed via the unsubscription link in the\ + \ email" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_unsubscriptions_userUnsubscription" + adminUnsubscription: + type: "array" + description: "Contact has been unsubscribed from the administrator" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_unsubscriptions_adminUnsubscription" + getContactCampaignStats_opened: + type: "object" + required: + - "campaignId" + - "count" + - "eventTime" + - "ip" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + count: + type: "integer" + format: "int64" + example: 3 + description: "Number of openings of the campaign" + eventTime: + type: "string" + example: "2017-03-12T20:15:13Z" + description: "UTC date-time of the event" + ip: + type: "string" + example: "165.87.3.15" + description: "IP from which the user has opened the campaign" + getContactCampaignStats_clicked: + type: "object" + required: + - "campaignId" + - "links" + properties: + campaignId: + type: "integer" + format: "int64" + example: 3 + description: "ID of the campaign which generated the event" + links: + type: "array" + items: + $ref: "#/definitions/getExtendedContactDetails_statistics_links" + getContactCampaignStats_transacAttributes: + type: "object" + required: + - "orderDate" + - "orderId" + - "orderPrice" + properties: + orderDate: + type: "string" + format: "date" + example: "2017-03-12" + description: "Date of the order" + orderPrice: + type: "number" + format: "float" + example: 24.99 + description: "Price of the order" + orderId: + type: "integer" + format: "int64" + example: 248 + description: "ID of the order" + getAttributes_enumeration: + type: "object" + required: + - "label" + - "value" + properties: + value: + type: "integer" + format: "int64" + example: 1 + description: "ID of Value of the \"category\" type attribute" + label: + type: "string" + example: "Women" + description: "Label of the \"category\" type attribute" + getAttributes_attributes: + type: "object" + required: + - "category" + - "name" + properties: + name: + type: "string" + example: "LASTNAME" + description: "Name of the attribute" + category: + type: "string" + example: "category" + description: "Category of the attribute" + enum: + - "normal" + - "transactional" + - "category" + - "calculated" + - "global" + type: + type: "string" + example: "text" + description: "Type of the attribute" + enum: + - "text" + - "date" + - "float" + - "id" + - "boolean" + enumeration: + type: "array" + description: "Parameter only available for \"category\" type attributes." + items: + $ref: "#/definitions/getAttributes_enumeration" + calculatedValue: + type: "string" + example: "COUNT[ORDER_ID,ORDER_DATE,==,NOW(-1)]" + description: "Calculated value formula" + getExtendedList_campaignStats: + type: "object" + required: + - "campaignId" + - "stats" + properties: + campaignId: + type: "integer" + format: "int64" + example: 143 + description: "ID of the campaign" + stats: + $ref: "#/definitions/getCampaignStats" + updateSmtpTemplate_sender: + type: "object" + properties: + name: + type: "string" + example: "Mary from MyShop" + description: "Name of the sender" + email: + type: "string" + format: "email" + example: "contact@myshop.com" + description: "Email of the sender" + id: + type: "integer" + format: "int64" + example: 3 + description: "Select the sender for the template on the basis of sender id.\ + \ In order to select a sender with specific pool of IP’s, dedicated ip users\ + \ shall pass id (instead of email)." + description: "Sender details including id or email and name (optional). Only one\ + \ of either Sender's email or Sender's ID shall be passed in one request at\ + \ a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` ,\ + \ `{\"name\":\"xyz\", \"id\":123}`" + createSmtpTemplate_sender: + type: "object" + properties: + name: + type: "string" + example: "Mary from MyShop" + description: "Name of the sender. If not passed, will be set to default" + email: + type: "string" + format: "email" + example: "contact@myshop.com" + description: "Email of the sender" + id: + type: "integer" + format: "int64" + example: 3 + description: "Select the sender for the template on the basis of sender id.\ + \ In order to select a sender with specific pool of IP’s, dedicated ip users\ + \ shall pass id (instead of email)." + description: "Sender details including id or email and name (optional). Only one\ + \ of either Sender's email or Sender's ID shall be passed in one request at\ + \ a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` ,\ + \ `{\"name\":\"xyz\", \"id\":123}`" + createEmailCampaign_sender: + type: "object" + required: + - "email" + properties: + name: + type: "string" + example: "Mary from MyShop" + description: "Sender Name" + email: + type: "string" + format: "email" + example: "newsletter@myshop.com" + description: "Sender email" + id: + type: "integer" + format: "int64" + example: 3 + description: "Select the sender for the campaign on the basis of sender id.\ + \ In order to select a sender with specific pool of IP’s, dedicated ip users\ + \ shall pass id (instead of email)." + description: "Sender details including id or email and name (optional). Only one\ + \ of either Sender's email or Sender's ID shall be passed in one request at\ + \ a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` ,\ + \ `{\"name\":\"xyz\", \"id\":123}`" + createEmailCampaign_recipients: + type: "object" + properties: + exclusionListIds: + type: "array" + description: "List ids to exclude from the campaign" + items: + type: "integer" + format: "int64" + example: 8 + listIds: + type: "array" + description: "Mandatory if scheduledAt is not empty. List Ids to send the\ + \ campaign to" + items: + type: "integer" + format: "int64" + example: 32 + description: "List ids to include/exclude from campaign" + updateEmailCampaign_sender: + type: "object" + properties: + name: + type: "string" + example: "Mary from MyShop" + description: "Sender Name from which the campaign emails are sent" + email: + type: "string" + format: "email" + example: "newsletter@myshop.com" + description: "Sender email from which the campaign emails are sent" + id: + type: "integer" + format: "int64" + example: 3 + description: "Select the sender for the campaign on the basis of sender id.\ + \ In order to select a sender with specific pool of IP’s, dedicated ip users\ + \ shall pass id (instead of email)." + description: "Sender details including id or email and name (optional). Only one\ + \ of either Sender's email or Sender's ID shall be passed in one request at\ + \ a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` ,\ + \ `{\"name\":\"xyz\", \"id\":123}`" + updateEmailCampaign_recipients: + type: "object" + properties: + exclusionListIds: + type: "array" + description: "List ids which have to be excluded from a campaign" + items: + type: "integer" + format: "int64" + example: 8 + listIds: + type: "array" + description: "Lists Ids to send the campaign to. REQUIRED if already not present\ + \ in campaign and scheduledAt is not empty" + items: + type: "integer" + format: "int64" + example: 32 + description: "List ids to include/exclude from campaign" + abTestCampaignResult_statistics: + type: "object" + required: + - "clicks" + - "complaints" + - "hardBounces" + - "openers" + - "softBounces" + - "unsubscribed" + properties: + openers: + $ref: "#/definitions/abTestVersionStats" + clicks: + $ref: "#/definitions/abTestVersionStats" + unsubscribed: + $ref: "#/definitions/abTestVersionStats" + hardBounces: + $ref: "#/definitions/abTestVersionStats" + softBounces: + $ref: "#/definitions/abTestVersionStats" + complaints: + $ref: "#/definitions/abTestVersionStats" + abTestCampaignResult_clickedLinks: + type: "object" + required: + - "Version A" + - "Version B" + properties: + Version A: + $ref: "#/definitions/abTestVersionClicks" + Version B: + $ref: "#/definitions/abTestVersionClicks" + sendReport_email: + type: "object" + required: + - "body" + - "to" + properties: + to: + type: "array" + description: "Email addresses of the recipients" + items: + type: "string" + format: "email" + example: "jim.suehan@example.com" + description: "Email address of the recipient" + body: + type: "string" + example: "Please find attached the report of our last email campaign." + description: "Custom text message to be presented in the report email." + description: "Custom attributes for the report email." + sendSmtpEmail_sender: + type: "object" + properties: + name: + type: "string" + example: "Mary from MyShop" + description: "Name of the sender from which the emails will be sent. Maximum\ + \ allowed characters are 70. Applicable only when email is passed." + email: + type: "string" + format: "email" + example: "no-reply@myshop.com" + description: "Email of the sender from which the emails will be sent. Mandatory\ + \ if sender id is not passed." + id: + type: "integer" + format: "int64" + example: 2 + description: "Id of the sender from which the emails will be sent. In order\ + \ to select a sender with specific pool of IP’s, dedicated ip users shall\ + \ pass id (instead of email). Mandatory if email is not passed." + description: "Mandatory if `templateId` is not passed. Pass `name` (optional)\ + \ and `email` OR `id` of sender from which emails will be sent. `name` will\ + \ be ignored if passed along with sender `id`. For example, {\"name\":\"Mary\ + \ from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2}" + sendSmtpEmail_to: + type: "object" + required: + - "email" + properties: + email: + type: "string" + format: "email" + example: "jimmy98@example.com" + description: "Email address of the recipient" + name: + type: "string" + example: "Jimmy" + description: "Name of the recipient. Maximum allowed characters are 70." + sendSmtpEmail_bcc: + type: "object" + required: + - "email" + properties: + email: + type: "string" + format: "email" + example: "helen9766@example.com" + description: "Email address of the recipient in bcc" + name: + type: "string" + example: "Helen" + description: "Name of the recipient in bcc. Maximum allowed characters are\ + \ 70." + sendSmtpEmail_cc: + type: "object" + required: + - "email" + properties: + email: + type: "string" + format: "email" + example: "ann6533@example.com" + description: "Email address of the recipient in cc" + name: + type: "string" + example: "Ann" + description: "Name of the recipient in cc. Maximum allowed characters are\ + \ 70." + sendSmtpEmail_replyTo: + type: "object" + required: + - "email" + properties: + email: + type: "string" + format: "email" + example: "ann6533@example.com" + description: "Email address in reply to" + name: + type: "string" + example: "Ann" + description: "Name in reply to. Maximum allowed characters are 70." + description: "Email (required), along with name (optional), on which transactional\ + \ mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\"\ + , \"name\":\"Ann\"}." + sendSmtpEmail_attachment: + type: "object" + properties: + url: + type: "string" + format: "url" + example: "https://attachment.domain.com/myAttachmentFromUrl.jpg" + description: "Absolute url of the attachment (no local file)." + content: + type: "string" + format: "byte" + example: "b3JkZXIucGRm" + description: "Base64 encoded chunk data of the attachment generated on the\ + \ fly" + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + name: + type: "string" + example: "myAttachment.png" + description: "Required if content is passed. Name of the attachment" + sendSmtpEmail_to_1: + type: "object" + required: + - "email" + properties: + email: + type: "string" + format: "email" + example: "jimmy98@example.com" + description: "Email address of the recipient" + name: + type: "string" + example: "Jimmy" + description: "Name of the recipient. **Maximum allowed characters are 70**." + sendSmtpEmail_replyTo_1: + type: "object" + required: + - "email" + properties: + email: + type: "string" + format: "email" + example: "ann6533@example.com" + description: "Email address in reply to" + name: + type: "string" + example: "Ann" + description: "Name in reply to. Maximum allowed characters are 70." + description: "Email (required), along with name (optional), on which transactional\ + \ mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\"\ + , \"name\":\"Ann\"}" + sendSmtpEmail_messageVersions: + type: "object" + required: + - "to" + properties: + to: + type: "array" + description: "List of email addresses and names (_optional_) of the recipients.\ + \ For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"},\ + \ {\"name\":\"Joe\", \"email\":\"joe@example.com\"}]" + items: + $ref: "#/definitions/sendSmtpEmail_to_1" + params: + type: "object" + example: + FNAME: "Joe" + LNAME: "Doe" + description: "Pass the set of attributes to customize the template. For example,\ + \ {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template\ + \ is in New Template Language format." + additionalProperties: {} + bcc: + type: "array" + description: "List of email addresses and names (optional) of the recipients\ + \ in bcc" + items: + $ref: "#/definitions/sendSmtpEmail_bcc" + cc: + type: "array" + description: "List of email addresses and names (optional) of the recipients\ + \ in cc" + items: + $ref: "#/definitions/sendSmtpEmail_cc" + replyTo: + $ref: "#/definitions/sendSmtpEmail_replyTo_1" + subject: + type: "string" + example: "Login Email confirmation" + description: "Custom subject specific to message version\n" + updateBatchContacts_contacts: + type: "object" + properties: + email: + type: "string" + format: "email" + example: "elly@example.com" + description: "Email address of the user to be updated (For each operation\ + \ only pass one of the supported contact identifiers. Email, id or sms)" + id: + type: "integer" + format: "int64" + example: 31 + description: "id of the user to be updated (For each operation only pass one\ + \ of the supported contact identifiers. Email, id or sms)" + sms: + type: "string" + example: "+91xxxxxxxxxx" + description: "SMS of the user to be updated (For each operation only pass\ + \ one of the supported contact identifiers. Email, id or sms)" + attributes: + type: "object" + example: + EMAIL: "newemail@domain.com" + FNAME: "Ellie" + LNAME: "Roger" + description: "Pass the set of attributes to be updated. **These attributes\ + \ must be present in your account**. To update existing email address of\ + \ a contact with the new one please pass EMAIL in attribtes. For example,\ + \ **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\"\ + :\"Roger\"}**.\nKeep in mind transactional attributes can be updated the\ + \ same way as normal attributes. Mobile Number in **SMS** field should be\ + \ passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"\ + } or {\"SMS\":\"0091xxxxxxxxxx\"}**\n" + additionalProperties: {} + emailBlacklisted: + type: "boolean" + example: false + description: "Set/unset this field to blacklist/allow the contact for emails\ + \ (emailBlacklisted = true)" + smsBlacklisted: + type: "boolean" + example: true + description: "Set/unset this field to blacklist/allow the contact for SMS\ + \ (smsBlacklisted = true)" + listIds: + type: "array" + description: "Ids of the lists to add the contact to" + items: + type: "integer" + format: "int64" + example: 65 + description: "Id of the list to add the contact to" + unlinkListIds: + type: "array" + description: "Ids of the lists to remove the contact from" + items: + type: "integer" + format: "int64" + example: 36 + description: "Id of the list to remove the contact from" + smtpBlacklistSender: + type: "array" + description: "transactional email forbidden sender for contact. Use only for\ + \ email Contact" + items: + type: "string" + format: "email" + createAttribute_enumeration: + type: "object" + required: + - "label" + - "value" + properties: + value: + type: "integer" + example: 1 + description: "Id of the value" + label: + type: "string" + example: "Women" + description: "Label of the value" + updateAttribute_enumeration: + type: "object" + required: + - "label" + - "value" + properties: + value: + type: "integer" + example: 1 + description: "Id of the value" + label: + type: "string" + example: "Men" + description: "Label of the value" + requestContactExport_customContactFilter: + type: "object" + properties: + actionForContacts: + type: "string" + description: "Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns\ + \ is passed. This will export the contacts on the basis of provided action\ + \ applied on contacts as per the list id. * allContacts - Fetch the list\ + \ of all contacts for a particular list. * subscribed & unsubscribed - Fetch\ + \ the list of subscribed / unsubscribed (blacklisted via any means) contacts\ + \ for a particular list. * unsubscribedPerList - Fetch the list of contacts\ + \ that are unsubscribed from a particular list only.\n" + enum: + - "allContacts" + - "subscribed" + - "unsubscribed" + - "unsubscribedPerList" + actionForEmailCampaigns: + type: "string" + description: "Mandatory if neither actionForContacts nor actionForSmsCampaigns\ + \ is passed. This will export the contacts on the basis of provided action\ + \ applied on email campaigns. * openers & nonOpeners - emailCampaignId is\ + \ mandatory. Fetch the list of readers / non-readers for a particular email\ + \ campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch\ + \ the list of clickers / non-clickers for a particular email campaign. *\ + \ unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed\ + \ (blacklisted via any means) contacts for a particular email campaign.\ + \ * hardBounces & softBounces - emailCampaignId is optional. Fetch the list\ + \ of hard bounces / soft bounces for a particular / all email campaign(s).\n" + enum: + - "openers" + - "nonOpeners" + - "clickers" + - "nonClickers" + - "unsubscribed" + - "hardBounces" + - "softBounces" + actionForSmsCampaigns: + type: "string" + description: "Mandatory if neither actionForContacts nor actionForEmailCampaigns\ + \ is passed. This will export the contacts on the basis of provided action\ + \ applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed\ + \ (blacklisted via any means) contacts for all / particular sms campaigns.\ + \ * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces\ + \ for all / particular sms campaigns.\n" + enum: + - "hardBounces" + - "softBounces" + - "unsubscribed" + listId: + type: "integer" + format: "int64" + example: 2 + description: "Mandatory if actionForContacts is passed, ignored otherwise.\ + \ Id of the list for which the corresponding action shall be applied in\ + \ the filter." + emailCampaignId: + type: "integer" + format: "int64" + example: 12 + description: "Considered only if actionForEmailCampaigns is passed, ignored\ + \ otherwise. Mandatory if action is one of the following - openers, nonOpeners,\ + \ clickers, nonClickers, unsubscribed. The id of the email campaign for\ + \ which the corresponding action shall be applied in the filter." + smsCampaignId: + type: "integer" + format: "int64" + example: 12 + description: "Considered only if actionForSmsCampaigns is passed, ignored\ + \ otherwise. The id of sms campaign for which the corresponding action shall\ + \ be applied in the filter." + description: "Set the filter for the contacts to be exported." + requestContactImport_newList: + type: "object" + properties: + listName: + type: "string" + example: "ContactImport - 2017-05" + description: "List with listName will be created first and users will be imported\ + \ in it (Mandatory if listIds is empty)." + folderId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the folder where this new list shall be created (Mandatory\ + \ if listName is not empty)." + description: "To create a new list and import the contacts into it, pass the listName\ + \ and an optional folderId." + createSmsCampaign_recipients: + type: "object" + required: + - "listIds" + properties: + listIds: + type: "array" + description: "Lists Ids to send the campaign to. REQUIRED if scheduledAt is\ + \ not empty" + items: + type: "integer" + format: "int64" + example: 54 + description: "List Id to send the campaign to" + exclusionListIds: + type: "array" + description: "List ids which have to be excluded from a campaign" + items: + type: "integer" + format: "int64" + example: 15 + description: "List Id to exclude from the campaign" + getTransacSmsReport_reports: + type: "object" + properties: + date: + type: "string" + format: "date" + example: "2017-03-17" + description: "Date for which statistics are retrieved" + requests: + type: "integer" + format: "int64" + example: 87 + description: "Number of requests for the date" + delivered: + type: "integer" + format: "int64" + example: 85 + description: "Number of delivered SMS for the date" + hardBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of hardbounces for the date" + softBounces: + type: "integer" + format: "int64" + example: 1 + description: "Number of softbounces for the date" + blocked: + type: "integer" + format: "int64" + example: 0 + description: "Number of blocked contact for the date" + unsubscribed: + type: "integer" + format: "int64" + example: 1 + description: "Number of unsubscription for the date" + replied: + type: "integer" + format: "int64" + example: 2 + description: "Number of answered SMS for the date" + accepted: + type: "integer" + format: "int64" + example: 85 + description: "Number of accepted for the date" + rejected: + type: "integer" + format: "int64" + example: 1 + description: "Number of rejected for the date" + getTransacEmailContent_events: + type: "object" + required: + - "name" + - "time" + properties: + name: + type: "string" + example: "delivered" + description: "Name of the event that occurred on the sent email" + time: + type: "string" + example: "2017-03-12T12:30:00Z" + description: "Time at which the event occurred" + getTransacEmailsList_transactionalEmails: + type: "object" + required: + - "date" + - "email" + - "messageId" + - "subject" + - "uuid" + properties: + email: + type: "string" + format: "email" + example: "john.smith@example.com" + description: "Email address to which transactional email has been sent" + subject: + type: "string" + example: "Summer Camp" + description: "Subject of the sent email" + templateId: + type: "integer" + format: "int64" + example: 2 + description: "Id of the template" + messageId: + type: "string" + example: "<201798300811.5700093@relay.domain.com>" + description: "Message Id of the sent email" + uuid: + type: "string" + example: "5a78c-209ok98262910-s99a341" + description: "Unique id of the email sent to a particular contact" + date: + type: "string" + example: "2017-03-12T12:30:00Z" + description: "Date on which transactional email was sent" + from: + type: "string" + format: "email" + example: "diana.doe@example.com" + description: "Email address of the sender from which the email was sent" + tags: + type: "array" + description: "Tags used for your email" + items: + type: "string" + example: "tag1" + abTestVersionClicks_inner: + type: "object" + required: + - "clickRate" + - "clicksCount" + - "link" + properties: + link: + type: "string" + example: "https://facbook.com/versionA" + description: "URL of the link" + clicksCount: + type: "number" + format: "int64" + example: 3.0 + description: "Number of times a link is clicked" + clickRate: + type: "string" + example: "40%" + description: "Percentage of clicks of link with respect to total clicks" + getInboundEmailEvents_events: + type: "object" + required: + - "date" + - "recipient" + - "sender" + - "uuid" + properties: + uuid: + type: "string" + format: "uuid" + description: "UUID that can be used to fetch additional data" + date: + type: "string" + format: "date-time" + description: "Date when email was received on SMTP relay" + sender: + type: "string" + format: "email" + description: "Sender’s email address" + recipient: + type: "string" + format: "email" + description: "Recipient’s email address" + getInboundEmailEventsByUuid_attachments: + type: "object" + properties: + name: + type: "string" + description: "filename specified in the Content-Disposition header of the\ + \ attachment" + contentType: + type: "string" + description: "value of the Content-Type header of the attachment" + contentId: + type: "string" + description: "value of the Content-ID header of the attachment." + contentLength: + type: "integer" + description: "size of the attachment in bytes" + getInboundEmailEventsByUuid_logs: + type: "object" + properties: + date: + type: "string" + format: "date-time" + description: "Date of the event" + type: + type: "string" + description: "Type of the event" + enum: + - "received" + - "processed" + - "webhookFailed" + - "webhookDelivered" + getScheduledEmailByBatchId_batches: + type: "object" + required: + - "createdAt" + - "scheduledAt" + - "status" + properties: + scheduledAt: + type: "string" + format: "date-time" + description: "Datetime for which the batch was scheduled" + createdAt: + type: "string" + format: "date-time" + description: "Datetime on which the batch was scheduled" + status: + type: "string" + description: "Current status of the scheduled batch" + enum: + - "inProgress" + - "queued" + - "processed" + - "error" + subAccountsResponse_subAccounts: + type: "object" + required: + - "active" + - "companyName" + - "createdAt" + - "id" + properties: + id: + type: "integer" + format: "int64" + description: "id of the sub-account" + companyName: + type: "string" + description: "Name of the sub-account company" + active: + type: "boolean" + description: "Whether the sub-account is active or not" + createdAt: + type: "integer" + format: "int64" + description: "Timestamp when the sub-account was created" + masterDetailsResponse_billingInfo_name: + type: "object" + properties: + givenName: + type: "string" + description: "First name for billing" + familyName: + type: "string" + description: "Last name for billing" + description: "Billing name of master account holder" + masterDetailsResponse_billingInfo_address: + type: "object" + properties: + streetAddress: + type: "string" + description: "Street address" + locality: + type: "string" + description: "Locality" + postalCode: + type: "string" + description: "Postal code" + stateCode: + type: "string" + description: "State code" + countryCode: + type: "string" + description: "Country code" + description: "Billing address of master account" + masterDetailsResponse_billingInfo: + type: "object" + properties: + email: + type: "string" + description: "Billing email id of master account" + companyName: + type: "string" + description: "Company name of master account" + name: + $ref: "#/definitions/masterDetailsResponse_billingInfo_name" + address: + $ref: "#/definitions/masterDetailsResponse_billingInfo_address" + description: "Billing details of the master account organization" + masterDetailsResponse_planInfo_features: + type: "object" + properties: + name: + type: "string" + description: "Name of the feature" + unitValue: + type: "string" + description: "Unit value of the feature" + quantity: + type: "integer" + format: "int64" + description: "Quantity provided in the plan" + used: + type: "integer" + format: "int64" + description: "Quantity consumed by master" + remaining: + type: "integer" + format: "int64" + description: "Quantity remaining in the plan" + masterDetailsResponse_planInfo: + type: "object" + properties: + currencyCode: + type: "string" + description: "Plan currency" + nextBillingAt: + type: "integer" + format: "int64" + description: "Timestamp of next billing date" + price: + type: "number" + description: "Plan amount" + planPeriod: + type: "string" + description: "Plan period type" + enum: + - "month" + - "year" + subAccounts: + type: "integer" + description: "Number of sub-accounts" + features: + type: "array" + description: "List of provided features in the plan" + items: + $ref: "#/definitions/masterDetailsResponse_planInfo_features" + description: "Plan details" + subAccountDetailsResponse_planInfo_credits_emails: + type: "object" + properties: + quantity: + type: "integer" + format: "int64" + description: "Quantity of email messaging limits provided" + remaining: + type: "integer" + format: "int64" + description: "Available email messaging limits for use" + description: "Email credits remaining on the sub-account" + subAccountDetailsResponse_planInfo_credits: + type: "object" + properties: + sms: + type: "integer" + format: "int64" + description: "SMS credits remaining on the sub-account" + emails: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_credits_emails" + description: "Credits quota and remaining credits on the sub-account" + subAccountDetailsResponse_planInfo_features_inbox: + type: "object" + properties: + quantity: + type: "integer" + format: "int64" + description: "Quantity of inbox provided" + remaining: + type: "integer" + format: "int64" + description: "Available inboxes for use" + description: "Inbox details" + subAccountDetailsResponse_planInfo_features_landingPage: + type: "object" + properties: + quantity: + type: "integer" + format: "int64" + description: "Quantity of landing pages provided" + remaining: + type: "integer" + format: "int64" + description: "Available landing pages for use" + description: "Landing page details" + subAccountDetailsResponse_planInfo_features_users: + type: "object" + properties: + quantity: + type: "integer" + format: "int64" + description: "Quantity of multi-account's provided" + remaining: + type: "integer" + format: "int64" + description: "Available multi-accounts for use" + description: "Multi-account details" + subAccountDetailsResponse_planInfo_features: + type: "object" + properties: + inbox: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_features_inbox" + landingPage: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_features_landingPage" + users: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_features_users" + description: "Features available on the sub-account" + subAccountDetailsResponse_planInfo: + type: "object" + properties: + credits: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_credits" + features: + $ref: "#/definitions/subAccountDetailsResponse_planInfo_features" + planType: + type: "string" + description: "type of the plan" + description: "Sub-account plan details" + subAccountUpdatePlanRequest_credits: + type: "object" + properties: + email: + type: "integer" + format: "int64" + description: "Number of email credits" + description: "Credit details to update" + subAccountUpdatePlanRequest_features: + type: "object" + properties: + users: + type: "integer" + format: "int64" + description: "Number of multi-users" + landingPage: + type: "integer" + format: "int64" + description: "Number of landing pages" + inbox: + type: "integer" + format: "int64" + description: "Number of inboxes" + description: "Features details to update" + DealAttributes_inner: + type: "object" + properties: + internalName: + type: "string" + example: "deal_name" + label: + type: "string" + example: "Deal Name" + attributeTypeName: + type: "string" + example: "text" + attributeOptions: + type: "array" + items: + type: "object" + example: + key: "custom key" + value: "custom label" + properties: {} + isRequired: + type: "boolean" + example: true + description: "List of attributes" + CompanyAttributes_inner: + type: "object" + properties: + internalName: + type: "string" + example: "name" + label: + type: "string" + example: "Company Name" + attributeTypeName: + type: "string" + example: "text" + attributeOptions: + type: "array" + items: + type: "object" + example: + key: "custom key" + value: "custom label" + properties: {} + isRequired: + type: "boolean" + example: true + description: "List of attributes" +x-samples-languages: +- "curl" diff --git a/docs/AbTestCampaignResult.md b/docs/AbTestCampaignResult.md index 765e542..7147589 100644 --- a/docs/AbTestCampaignResult.md +++ b/docs/AbTestCampaignResult.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AbTestCampaignResultClickedLinks.md b/docs/AbTestCampaignResultClickedLinks.md index 02c2005..6a41612 100644 --- a/docs/AbTestCampaignResultClickedLinks.md +++ b/docs/AbTestCampaignResultClickedLinks.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**VersionA** | [***[]AbTestVersionClicksInner**](array.md) | | [default to null] -**VersionB** | [***[]AbTestVersionClicksInner**](array.md) | | [default to null] +**VersionA** | [***AbTestVersionClicks**](AbTestVersionClicks.md) | | [default to null] +**VersionB** | [***AbTestVersionClicks**](AbTestVersionClicks.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AbTestCampaignResultStatistics.md b/docs/AbTestCampaignResultStatistics.md index 87572ae..197b69a 100644 --- a/docs/AbTestCampaignResultStatistics.md +++ b/docs/AbTestCampaignResultStatistics.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes **Unsubscribed** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] **HardBounces** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] **SoftBounces** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] -**Complaints** | [***AbTestVersionStats**](abTestVersionStats.md) | | [default to null] +**Complaints** | [***AbTestVersionStats**](AbTestVersionStats.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTemplateEmail.md b/docs/AbTestVersionClicks.md similarity index 71% rename from docs/SendTemplateEmail.md rename to docs/AbTestVersionClicks.md index 4875b4f..6436fc1 100644 --- a/docs/SendTemplateEmail.md +++ b/docs/AbTestVersionClicks.md @@ -1,9 +1,9 @@ -# SendTemplateEmail +# AbTestVersionClicks ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MessageId** | **string** | Message ID of the template Email sent | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AbTestVersionClicksInner.md b/docs/AbTestVersionClicksInner.md index 68afda3..879c39b 100644 --- a/docs/AbTestVersionClicksInner.md +++ b/docs/AbTestVersionClicksInner.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Link** | **string** | URL of the link | [default to null] -**ClicksCount** | **float64** | Number of times a link is clicked | [default to null] +**ClicksCount** | **float32** | Number of times a link is clicked | [default to null] **ClickRate** | **string** | Percentage of clicks of link with respect to total clicks | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AbTestVersionStats.md b/docs/AbTestVersionStats.md index 51baa96..1e52d5b 100644 --- a/docs/AbTestVersionStats.md +++ b/docs/AbTestVersionStats.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AccountApi.md b/docs/AccountApi.md index f44c4df..5263eb2 100644 --- a/docs/AccountApi.md +++ b/docs/AccountApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.AccountApi +# \AccountApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GetAccount**](AccountApi.md#GetAccount) | **Get** /account | Get your account information, plan and credits details + # **GetAccount** > GetAccount GetAccount(ctx, ) Get your account information, plan and credits details @@ -23,7 +24,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/AddChildDomain.md b/docs/AddChildDomain.md index faf3a41..64d9380 100644 --- a/docs/AddChildDomain.md +++ b/docs/AddChildDomain.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AddContactToList.md b/docs/AddContactToList.md index 443ebfe..aeee2b2 100644 --- a/docs/AddContactToList.md +++ b/docs/AddContactToList.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AddCredits.md b/docs/AddCredits.md index 343d9cf..dab2c84 100644 --- a/docs/AddCredits.md +++ b/docs/AddCredits.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/AllOfgetChildrenListChildrenItems.md b/docs/AllOfgetChildrenListChildrenItems.md deleted file mode 100644 index 33f4990..0000000 --- a/docs/AllOfgetChildrenListChildrenItems.md +++ /dev/null @@ -1,14 +0,0 @@ -# AllOfgetChildrenListChildrenItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Credits** | [***GetChildInfoCredits**](GetChildInfoCredits.md) | | [optional] [default to null] -**Statistics** | [***GetChildInfoStatistics**](GetChildInfoStatistics.md) | | [optional] [default to null] -**Password** | **string** | The encrypted password of child account | [default to null] -**Ips** | **[]string** | IP(s) associated to a child account user | [optional] [default to null] -**ApiKeys** | [***GetChildInfoApiKeys**](GetChildInfoApiKeys.md) | | [optional] [default to null] -**Id** | **int64** | ID of the child | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetContactsContactsItems.md b/docs/AllOfgetContactsContactsItems.md deleted file mode 100644 index bd42dca..0000000 --- a/docs/AllOfgetContactsContactsItems.md +++ /dev/null @@ -1,17 +0,0 @@ -# AllOfgetContactsContactsItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | Email address of the contact for which you requested the details | [default to null] -**Id** | **int64** | ID of the contact for which you requested the details | [default to null] -**EmailBlacklisted** | **bool** | Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) | [default to null] -**SmsBlacklisted** | **bool** | Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) | [default to null] -**CreatedAt** | **string** | Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**ListIds** | **[]int64** | | [default to null] -**ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | [***interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetEmailCampaignsCampaignsItems.md b/docs/AllOfgetEmailCampaignsCampaignsItems.md deleted file mode 100644 index 860160a..0000000 --- a/docs/AllOfgetEmailCampaignsCampaignsItems.md +++ /dev/null @@ -1,26 +0,0 @@ -# AllOfgetEmailCampaignsCampaignsItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TestSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | [default to null] -**Header** | **string** | Header of the campaign | [default to null] -**Footer** | **string** | Footer of the campaign | [default to null] -**Sender** | [***GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | [default to null] -**ReplyTo** | **string** | Email defined as the \"Reply to\" of the campaign | [default to null] -**ToField** | **string** | Customisation of the \"to\" field of the campaign | [optional] [default to null] -**HtmlContent** | **string** | HTML content of the campaign | [default to null] -**ShareLink** | **string** | Link to share the campaign on social medias | [optional] [default to null] -**Tag** | **string** | Tag of the campaign | [optional] [default to null] -**CreatedAt** | **string** | Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**ModifiedAt** | **string** | UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**InlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] [default to null] -**MirrorActive** | **bool** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] [default to null] -**Recurring** | **bool** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to null] -**SentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] [default to null] -**ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] -**Recipients** | [***interface{}**](interface{}.md) | | [default to null] -**Statistics** | [***interface{}**](interface{}.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetExtendedCampaignStatsCampaignStatsItems.md b/docs/AllOfgetExtendedCampaignStatsCampaignStatsItems.md deleted file mode 100644 index def90a2..0000000 --- a/docs/AllOfgetExtendedCampaignStatsCampaignStatsItems.md +++ /dev/null @@ -1,21 +0,0 @@ -# AllOfgetExtendedCampaignStatsCampaignStatsItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListId** | **int64** | List Id of email campaign (only in case of get email campaign(s)(not for global stats)) | [optional] [default to null] -**UniqueClicks** | **int64** | Number of unique clicks for the campaign | [default to null] -**Clickers** | **int64** | Number of total clicks for the campaign | [default to null] -**Complaints** | **int64** | Number of complaints (Spam reports) for the campaign | [default to null] -**Delivered** | **int64** | Number of delivered emails for the campaign | [default to null] -**Sent** | **int64** | Number of sent emails for the campaign | [default to null] -**SoftBounces** | **int64** | Number of softbounce for the campaign | [default to null] -**HardBounces** | **int64** | Number of harbounce for the campaign | [default to null] -**UniqueViews** | **int64** | Number of unique openings for the campaign | [default to null] -**Unsubscriptions** | **int64** | Number of unsubscription for the campaign | [default to null] -**Viewed** | **int64** | Number of openings for the campaign | [default to null] -**Deferred** | **int64** | Number of deferred emails for the campaign | [optional] [default to null] -**ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetExtendedCampaignStatsGlobalStats.md b/docs/AllOfgetExtendedCampaignStatsGlobalStats.md deleted file mode 100644 index 727f680..0000000 --- a/docs/AllOfgetExtendedCampaignStatsGlobalStats.md +++ /dev/null @@ -1,21 +0,0 @@ -# AllOfgetExtendedCampaignStatsGlobalStats - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListId** | **int64** | List Id of email campaign (only in case of get email campaign(s)(not for global stats)) | [optional] [default to null] -**UniqueClicks** | **int64** | Number of unique clicks for the campaign | [default to null] -**Clickers** | **int64** | Number of total clicks for the campaign | [default to null] -**Complaints** | **int64** | Number of complaints (Spam reports) for the campaign | [default to null] -**Delivered** | **int64** | Number of delivered emails for the campaign | [default to null] -**Sent** | **int64** | Number of sent emails for the campaign | [default to null] -**SoftBounces** | **int64** | Number of softbounce for the campaign | [default to null] -**HardBounces** | **int64** | Number of harbounce for the campaign | [default to null] -**UniqueViews** | **int64** | Number of unique openings for the campaign | [default to null] -**Unsubscriptions** | **int64** | Number of unsubscription for the campaign | [default to null] -**Viewed** | **int64** | Number of openings for the campaign | [default to null] -**Deferred** | **int64** | Number of deferred emails for the campaign | [optional] [default to null] -**ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetFolderListsListsItems.md b/docs/AllOfgetFolderListsListsItems.md deleted file mode 100644 index 6cd5c21..0000000 --- a/docs/AllOfgetFolderListsListsItems.md +++ /dev/null @@ -1,12 +0,0 @@ -# AllOfgetFolderListsListsItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | ID of the list | [default to null] -**Name** | **string** | Name of the list | [default to null] -**TotalBlacklisted** | **int64** | Number of blacklisted contacts in the list | [default to null] -**TotalSubscribers** | **int64** | Number of contacts in the list | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetFoldersFoldersItems.md b/docs/AllOfgetFoldersFoldersItems.md deleted file mode 100644 index 7df3a61..0000000 --- a/docs/AllOfgetFoldersFoldersItems.md +++ /dev/null @@ -1,13 +0,0 @@ -# AllOfgetFoldersFoldersItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | ID of the folder | [default to null] -**Name** | **string** | Name of the folder | [default to null] -**TotalBlacklisted** | **int64** | Number of blacklisted contacts in the folder | [default to null] -**TotalSubscribers** | **int64** | Number of contacts in the folder | [default to null] -**UniqueSubscribers** | **int64** | Number of unique contacts in the folder | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetListsListsItems.md b/docs/AllOfgetListsListsItems.md deleted file mode 100644 index 011340e..0000000 --- a/docs/AllOfgetListsListsItems.md +++ /dev/null @@ -1,13 +0,0 @@ -# AllOfgetListsListsItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | ID of the list | [default to null] -**Name** | **string** | Name of the list | [default to null] -**TotalBlacklisted** | **int64** | Number of blacklisted contacts in the list | [default to null] -**TotalSubscribers** | **int64** | Number of contacts in the list | [default to null] -**FolderId** | **int64** | ID of the folder | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetSmsCampaignsCampaignsItems.md b/docs/AllOfgetSmsCampaignsCampaignsItems.md deleted file mode 100644 index 9a54ef4..0000000 --- a/docs/AllOfgetSmsCampaignsCampaignsItems.md +++ /dev/null @@ -1,18 +0,0 @@ -# AllOfgetSmsCampaignsCampaignsItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | ID of the SMS Campaign | [default to null] -**Name** | **string** | Name of the SMS Campaign | [default to null] -**Status** | **string** | Status of the SMS Campaign | [default to null] -**Content** | **string** | Content of the SMS Campaign | [default to null] -**ScheduledAt** | **string** | UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format | [optional] [default to null] -**Sender** | **string** | Sender of the SMS Campaign | [default to null] -**CreatedAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**ModifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**Recipients** | [***interface{}**](interface{}.md) | | [default to null] -**Statistics** | [***interface{}**](interface{}.md) | | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AllOfgetWebhooksWebhooksItems.md b/docs/AllOfgetWebhooksWebhooksItems.md deleted file mode 100644 index 3410317..0000000 --- a/docs/AllOfgetWebhooksWebhooksItems.md +++ /dev/null @@ -1,15 +0,0 @@ -# AllOfgetWebhooksWebhooksItems - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | URL of the webhook | [default to null] -**Id** | **int64** | ID of the webhook | [default to null] -**Description** | **string** | Description of the webhook | [default to null] -**Events** | **[]string** | | [default to null] -**Type_** | **string** | Type of webhook (marketing or transac) | [default to null] -**CreatedAt** | **string** | Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**ModifiedAt** | **string** | Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/AttributesApi.md b/docs/AttributesApi.md index 6e2e070..0482a45 100644 --- a/docs/AttributesApi.md +++ b/docs/AttributesApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.AttributesApi +# \AttributesApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -9,8 +9,9 @@ Method | HTTP request | Description [**GetAttributes**](AttributesApi.md#GetAttributes) | **Get** /contacts/attributes | List all attributes [**UpdateAttribute**](AttributesApi.md#UpdateAttribute) | **Put** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute + # **CreateAttribute** -> CreateAttribute(ctx, body, attributeCategory, attributeName) +> CreateAttribute(ctx, attributeCategory, attributeName, createAttribute) Create contact attribute ### Required Parameters @@ -18,9 +19,9 @@ Create contact attribute Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | **attributeCategory** | **string**| Category of the attribute | **attributeName** | **string**| Name of the attribute | + **createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | ### Return type @@ -59,7 +60,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -81,13 +82,13 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateAttribute** -> UpdateAttribute(ctx, body, attributeCategory, attributeName) +> UpdateAttribute(ctx, attributeCategory, attributeName, updateAttribute) Update contact attribute ### Required Parameters @@ -95,9 +96,9 @@ Update contact attribute Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | **attributeCategory** | **string**| Category of the attribute | **attributeName** | **string**| Name of the existing attribute | + **updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | ### Return type diff --git a/docs/BlockDomain.md b/docs/BlockDomain.md index 07788ed..bfb68fa 100644 --- a/docs/BlockDomain.md +++ b/docs/BlockDomain.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendEmailAttachment.md b/docs/Body.md similarity index 55% rename from docs/SendEmailAttachment.md rename to docs/Body.md index ea20974..4aaa1e9 100644 --- a/docs/SendEmailAttachment.md +++ b/docs/Body.md @@ -1,10 +1,11 @@ -# SendEmailAttachment +# Body ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Content** | **string** | Base64 encoded chunk data of the attachment generated on the fly | [default to null] -**Name** | **string** | Required for content. Name of the attachment | [default to null] +**Name** | **string** | Name of deal | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes fo\\r deal creation | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Body1.md b/docs/Body1.md new file mode 100644 index 0000000..99a521f --- /dev/null +++ b/docs/Body1.md @@ -0,0 +1,11 @@ +# Body1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of deal | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for deal update | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body2.md b/docs/Body2.md new file mode 100644 index 0000000..5ab3e78 --- /dev/null +++ b/docs/Body2.md @@ -0,0 +1,11 @@ +# Body2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of company | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for company creation | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body3.md b/docs/Body3.md new file mode 100644 index 0000000..7da2598 --- /dev/null +++ b/docs/Body3.md @@ -0,0 +1,11 @@ +# Body3 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of company | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Attributes for company update | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body4.md b/docs/Body4.md new file mode 100644 index 0000000..25f25cd --- /dev/null +++ b/docs/Body4.md @@ -0,0 +1,13 @@ +# Body4 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkContactIds** | **[]int32** | Contact ids for contacts to be linked with company | [optional] [default to null] +**UnlinkContactIds** | **[]int32** | Contact ids for contacts to be unlinked from company | [optional] [default to null] +**LinkDealsIds** | **[]string** | Deals ids for deals to be linked with company | [optional] [default to null] +**UnlinkDealsIds** | **[]string** | Deals ids for deals to be unlinked from company | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body5.md b/docs/Body5.md new file mode 100644 index 0000000..3ceb95a --- /dev/null +++ b/docs/Body5.md @@ -0,0 +1,20 @@ +# Body5 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of task | [default to null] +**Duration** | **int64** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] [default to null] +**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [default to null] +**Date** | [**time.Time**](time.Time.md) | Task due date and time | [default to null] +**Notes** | **string** | Notes added to a task | [optional] [default to null] +**Done** | **bool** | Task marked as done | [optional] [default to null] +**AssignToId** | **string** | User id to whom task is assigned | [optional] [default to null] +**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] +**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] +**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] +**Reminder** | [***TaskReminder**](TaskReminder.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Body6.md b/docs/Body6.md new file mode 100644 index 0000000..a99c633 --- /dev/null +++ b/docs/Body6.md @@ -0,0 +1,19 @@ +# Body6 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of task | [optional] [default to null] +**Duration** | **int32** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] [default to null] +**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [optional] [default to null] +**Date** | [**time.Time**](time.Time.md) | Task date/time | [optional] [default to null] +**Notes** | **string** | Notes added to a task | [optional] [default to null] +**Done** | **bool** | Task marked as done | [optional] [default to null] +**AssignToId** | **string** | User id to whom task is assigned | [optional] [default to null] +**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] +**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] +**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CRMApi.md b/docs/CRMApi.md new file mode 100644 index 0000000..4e677c4 --- /dev/null +++ b/docs/CRMApi.md @@ -0,0 +1,335 @@ +# \CRMApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CrmNotesGet**](CRMApi.md#CrmNotesGet) | **Get** /crm/notes | Get all notes +[**CrmNotesIdDelete**](CRMApi.md#CrmNotesIdDelete) | **Delete** /crm/notes/{id} | Delete a note +[**CrmNotesIdGet**](CRMApi.md#CrmNotesIdGet) | **Get** /crm/notes/{id} | Get a note +[**CrmNotesIdPatch**](CRMApi.md#CrmNotesIdPatch) | **Patch** /crm/notes/{id} | Update a note +[**CrmNotesPost**](CRMApi.md#CrmNotesPost) | **Post** /crm/notes | Create a note +[**CrmTasksGet**](CRMApi.md#CrmTasksGet) | **Get** /crm/tasks | Get all tasks +[**CrmTasksIdDelete**](CRMApi.md#CrmTasksIdDelete) | **Delete** /crm/tasks/{id} | Delete a task +[**CrmTasksIdGet**](CRMApi.md#CrmTasksIdGet) | **Get** /crm/tasks/{id} | Get a task +[**CrmTasksIdPatch**](CRMApi.md#CrmTasksIdPatch) | **Patch** /crm/tasks/{id} | Update a task +[**CrmTasksPost**](CRMApi.md#CrmTasksPost) | **Post** /crm/tasks | Create a task +[**CrmTasktypesGet**](CRMApi.md#CrmTasktypesGet) | **Get** /crm/tasktypes | Get all task types + + +# **CrmNotesGet** +> NoteList CrmNotesGet(ctx, optional) +Get all notes + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CrmNotesGetOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a CrmNotesGetOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **entity** | **optional.String**| Filter by note entity type | + **entityIds** | **optional.String**| Filter by note entity IDs | + **dateFrom** | **optional.Int32**| dateFrom to date range filter type (timestamp in milliseconds) | + **dateTo** | **optional.Int32**| dateTo to date range filter type (timestamp in milliseconds) | + **offset** | **optional.Int64**| Index of the first document of the page | + **limit** | **optional.Int64**| Number of documents per page | [default to 50] + **sort** | **optional.String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | + +### Return type + +[**NoteList**](NoteList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmNotesIdDelete** +> CrmNotesIdDelete(ctx, id) +Delete a note + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Note ID to delete | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmNotesIdGet** +> Note CrmNotesIdGet(ctx, id) +Get a note + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Note ID to get | + +### Return type + +[**Note**](Note.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmNotesIdPatch** +> CrmNotesIdPatch(ctx, id, body) +Update a note + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| Note ID to update | + **body** | [**NoteData**](NoteData.md)| Note data to update a note | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmNotesPost** +> NoteId CrmNotesPost(ctx, body) +Create a note + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**NoteData**](NoteData.md)| Note data to create a note. | + +### Return type + +[**NoteId**](NoteId.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmTasksGet** +> TaskList CrmTasksGet(ctx, optional) +Get all tasks + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CrmTasksGetOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a CrmTasksGetOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filterType** | **optional.String**| Filter by task type (ID) | + **filterStatus** | **optional.String**| Filter by task status | + **filterDate** | **optional.String**| Filter by date | + **filterAssignTo** | **optional.String**| Filter by assignTo id | + **filterContacts** | **optional.String**| Filter by contact ids | + **filterDeals** | **optional.String**| Filter by deals ids | + **filterCompanies** | **optional.String**| Filter by companies ids | + **dateFrom** | **optional.Int32**| dateFrom to date range filter type (timestamp in milliseconds) | + **dateTo** | **optional.Int32**| dateTo to date range filter type (timestamp in milliseconds) | + **offset** | **optional.Int64**| Index of the first document of the page | + **limit** | **optional.Int64**| Number of documents per page | [default to 50] + **sort** | **optional.String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | + **sortBy** | **optional.String**| The field used to sort field names. | + +### Return type + +[**TaskList**](TaskList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmTasksIdDelete** +> CrmTasksIdDelete(ctx, id) +Delete a task + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmTasksIdGet** +> Task CrmTasksIdGet(ctx, id) +Get a task + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + +### Return type + +[**Task**](Task.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmTasksIdPatch** +> CrmTasksIdPatch(ctx, id, body) +Update a task + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + **body** | [**Body6**](Body6.md)| Updated task details. | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmTasksPost** +> InlineResponse2011 CrmTasksPost(ctx, body) +Create a task + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**Body5**](Body5.md)| Task name. | + +### Return type + +[**InlineResponse2011**](InlineResponse2011.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmTasktypesGet** +> TaskTypes CrmTasktypesGet(ctx, ) +Get all task types + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**TaskTypes**](TaskTypes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CompaniesApi.md b/docs/CompaniesApi.md new file mode 100644 index 0000000..6a41c4e --- /dev/null +++ b/docs/CompaniesApi.md @@ -0,0 +1,208 @@ +# \CompaniesApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CompaniesAttributesGet**](CompaniesApi.md#CompaniesAttributesGet) | **Get** /companies/attributes | Get company attributes +[**CompaniesGet**](CompaniesApi.md#CompaniesGet) | **Get** /companies | Get all companies +[**CompaniesIdDelete**](CompaniesApi.md#CompaniesIdDelete) | **Delete** /companies/{id} | Delete a company +[**CompaniesIdGet**](CompaniesApi.md#CompaniesIdGet) | **Get** /companies/{id} | Get a company +[**CompaniesIdPatch**](CompaniesApi.md#CompaniesIdPatch) | **Patch** /companies/{id} | Update a company +[**CompaniesLinkUnlinkIdPatch**](CompaniesApi.md#CompaniesLinkUnlinkIdPatch) | **Patch** /companies/link-unlink/{id} | Link and Unlink company with contacts and deals +[**CompaniesPost**](CompaniesApi.md#CompaniesPost) | **Post** /companies | Create a company + + +# **CompaniesAttributesGet** +> CompanyAttributes CompaniesAttributesGet(ctx, ) +Get company attributes + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**CompanyAttributes**](CompanyAttributes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CompaniesGet** +> CompaniesList CompaniesGet(ctx, optional) +Get all companies + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CompaniesGetOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a CompaniesGetOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filters** | **optional.String**| Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} | + **linkedContactsIds** | **optional.Int64**| Filter by linked contacts ids | + **linkedDealsIds** | **optional.String**| Filter by linked deals ids | + **page** | **optional.Int64**| Index of the first document of the page | + **limit** | **optional.Int64**| Number of documents per page | [default to 50] + **sort** | **optional.String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | + **sortBy** | **optional.String**| The field used to sort field names. | + +### Return type + +[**CompaniesList**](CompaniesList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CompaniesIdDelete** +> CompaniesIdDelete(ctx, id) +Delete a company + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CompaniesIdGet** +> Company CompaniesIdGet(ctx, id) +Get a company + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + +### Return type + +[**Company**](Company.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CompaniesIdPatch** +> Company CompaniesIdPatch(ctx, id, body) +Update a company + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + **body** | [**Body3**](Body3.md)| Updated company details. | + +### Return type + +[**Company**](Company.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CompaniesLinkUnlinkIdPatch** +> CompaniesLinkUnlinkIdPatch(ctx, id, body) +Link and Unlink company with contacts and deals + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + **body** | [**Body4**](Body4.md)| Linked / Unlinked contacts and deals ids. | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CompaniesPost** +> InlineResponse200 CompaniesPost(ctx, body) +Create a company + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**Body2**](Body2.md)| Company create data. | + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CompaniesList.md b/docs/CompaniesList.md new file mode 100644 index 0000000..6e31fe8 --- /dev/null +++ b/docs/CompaniesList.md @@ -0,0 +1,10 @@ +# CompaniesList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]Company**](Company.md) | List of compaies | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Company.md b/docs/Company.md new file mode 100644 index 0000000..f7c4248 --- /dev/null +++ b/docs/Company.md @@ -0,0 +1,13 @@ +# Company + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique company id | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Company attributes with values | [optional] [default to null] +**LinkedContactsIds** | **[]int32** | Contact ids for contacts linked to this company | [optional] [default to null] +**LinkedDealsIds** | **[]string** | Deals ids for companies linked to this company | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CompanyAttributes.md b/docs/CompanyAttributes.md new file mode 100644 index 0000000..ec083e8 --- /dev/null +++ b/docs/CompanyAttributes.md @@ -0,0 +1,9 @@ +# CompanyAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CompanyAttributesInner.md b/docs/CompanyAttributesInner.md new file mode 100644 index 0000000..8c3282a --- /dev/null +++ b/docs/CompanyAttributesInner.md @@ -0,0 +1,14 @@ +# CompanyAttributesInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InternalName** | **string** | | [optional] [default to null] +**Label** | **string** | | [optional] [default to null] +**AttributeTypeName** | **string** | | [optional] [default to null] +**AttributeOptions** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**IsRequired** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index 4732587..717c75b 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.ContactsApi +# \ContactsApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -15,25 +15,27 @@ Method | HTTP request | Description [**DeleteFolder**](ContactsApi.md#DeleteFolder) | **Delete** /contacts/folders/{folderId} | Delete a folder (and all its lists) [**DeleteList**](ContactsApi.md#DeleteList) | **Delete** /contacts/lists/{listId} | Delete a list [**GetAttributes**](ContactsApi.md#GetAttributes) | **Get** /contacts/attributes | List all attributes -[**GetContactInfo**](ContactsApi.md#GetContactInfo) | **Get** /contacts/{identifier} | Get a contact's details -[**GetContactStats**](ContactsApi.md#GetContactStats) | **Get** /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact +[**GetContactInfo**](ContactsApi.md#GetContactInfo) | **Get** /contacts/{identifier} | Get a contact's details +[**GetContactStats**](ContactsApi.md#GetContactStats) | **Get** /contacts/{identifier}/campaignStats | Get email campaigns' statistics for a contact [**GetContacts**](ContactsApi.md#GetContacts) | **Get** /contacts | Get all the contacts [**GetContactsFromList**](ContactsApi.md#GetContactsFromList) | **Get** /contacts/lists/{listId}/contacts | Get contacts in a list -[**GetFolder**](ContactsApi.md#GetFolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details +[**GetFolder**](ContactsApi.md#GetFolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details [**GetFolderLists**](ContactsApi.md#GetFolderLists) | **Get** /contacts/folders/{folderId}/lists | Get lists in a folder [**GetFolders**](ContactsApi.md#GetFolders) | **Get** /contacts/folders | Get all folders -[**GetList**](ContactsApi.md#GetList) | **Get** /contacts/lists/{listId} | Get a list's details +[**GetList**](ContactsApi.md#GetList) | **Get** /contacts/lists/{listId} | Get a list's details [**GetLists**](ContactsApi.md#GetLists) | **Get** /contacts/lists | Get all the lists [**ImportContacts**](ContactsApi.md#ImportContacts) | **Post** /contacts/import | Import contacts [**RemoveContactFromList**](ContactsApi.md#RemoveContactFromList) | **Post** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list [**RequestContactExport**](ContactsApi.md#RequestContactExport) | **Post** /contacts/export | Export contacts [**UpdateAttribute**](ContactsApi.md#UpdateAttribute) | **Put** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute +[**UpdateBatchContacts**](ContactsApi.md#UpdateBatchContacts) | **Post** /contacts/batch | Update multiple contacts [**UpdateContact**](ContactsApi.md#UpdateContact) | **Put** /contacts/{identifier} | Update a contact [**UpdateFolder**](ContactsApi.md#UpdateFolder) | **Put** /contacts/folders/{folderId} | Update a folder [**UpdateList**](ContactsApi.md#UpdateList) | **Put** /contacts/lists/{listId} | Update a list + # **AddContactToList** -> PostContactInfo AddContactToList(ctx, body, listId) +> PostContactInfo AddContactToList(ctx, listId, contactEmails) Add existing contacts to a list ### Required Parameters @@ -41,8 +43,8 @@ Add existing contacts to a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**AddContactToList**](AddContactToList.md)| Emails addresses OR IDs of the contacts | **listId** | **int64**| Id of the list | + **contactEmails** | [**AddContactToList**](AddContactToList.md)| Emails addresses OR IDs of the contacts | ### Return type @@ -60,7 +62,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateAttribute** -> CreateAttribute(ctx, body, attributeCategory, attributeName) +> CreateAttribute(ctx, attributeCategory, attributeName, createAttribute) Create contact attribute ### Required Parameters @@ -68,9 +70,9 @@ Create contact attribute Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | **attributeCategory** | **string**| Category of the attribute | **attributeName** | **string**| Name of the attribute | + **createAttribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute | ### Return type @@ -88,7 +90,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateContact** -> CreateUpdateContactModel CreateContact(ctx, body) +> CreateUpdateContactModel CreateContact(ctx, createContact) Create a contact ### Required Parameters @@ -96,7 +98,7 @@ Create a contact Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateContact**](CreateContact.md)| Values to create a contact | + **createContact** | [**CreateContact**](CreateContact.md)| Values to create a contact | ### Return type @@ -114,7 +116,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateDoiContact** -> CreateDoiContact(ctx, body) +> CreateDoiContact(ctx, createDoiContact) Create Contact via DOI (Double-Opt-In) Flow ### Required Parameters @@ -122,7 +124,7 @@ Create Contact via DOI (Double-Opt-In) Flow Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateDoiContact**](CreateDoiContact.md)| Values to create the Double opt-in (DOI) contact | + **createDoiContact** | [**CreateDoiContact**](CreateDoiContact.md)| Values to create the Double opt-in (DOI) contact | ### Return type @@ -140,7 +142,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateFolder** -> CreateModel CreateFolder(ctx, body) +> CreateModel CreateFolder(ctx, createFolder) Create a folder ### Required Parameters @@ -148,7 +150,7 @@ Create a folder Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + **createFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | ### Return type @@ -166,7 +168,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateList** -> CreateModel CreateList(ctx, body) +> CreateModel CreateList(ctx, createList) Create a list ### Required Parameters @@ -174,7 +176,7 @@ Create a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateList**](CreateList.md)| Values to create a list | + **createList** | [**CreateList**](CreateList.md)| Values to create a list | ### Return type @@ -213,7 +215,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -239,7 +241,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -265,7 +267,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -291,7 +293,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -305,7 +307,7 @@ This endpoint does not need any parameter. ### Return type -[**GetAttributes**](getAttributes.md) +[**GetAttributes**](GetAttributes.md) ### Authorization @@ -313,21 +315,33 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetContactInfo** -> GetExtendedContactDetails GetContactInfo(ctx, identifier) +> GetExtendedContactDetails GetContactInfo(ctx, identifier, optional) Get a contact's details +Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **identifier** | **string**| Email (urlencoded) OR ID of the contact OR its SMS attribute value | + **optional** | ***GetContactInfoOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetContactInfoOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **startDate** | [**optional.Interface of interface{}**](.md)| **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | + **endDate** | [**optional.Interface of interface{}**](.md)| **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. | ### Return type @@ -339,7 +353,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -354,15 +368,16 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **identifier** | **string**| Email (urlencoded) OR ID of the contact | - **optional** | ***ContactsApiGetContactStatsOpts** | optional parameters | nil if no parameters + **optional** | ***GetContactStatsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ContactsApiGetContactStatsOpts struct +Optional parameters are passed through a pointer to a GetContactStatsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | - **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate | + **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days | ### Return type @@ -374,7 +389,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -388,10 +403,11 @@ Get all the contacts Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ContactsApiGetContactsOpts** | optional parameters | nil if no parameters + **optional** | ***GetContactsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ContactsApiGetContactsOpts struct +Optional parameters are passed through a pointer to a GetContactsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number of documents per page | [default to 50] @@ -409,7 +425,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -424,10 +440,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **listId** | **int64**| Id of the list | - **optional** | ***ContactsApiGetContactsFromListOpts** | optional parameters | nil if no parameters + **optional** | ***GetContactsFromListOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ContactsApiGetContactsFromListOpts struct +Optional parameters are passed through a pointer to a GetContactsFromListOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -438,7 +455,7 @@ Name | Type | Description | Notes ### Return type -[**GetContacts**](getContacts.md) +[**GetContacts**](GetContacts.md) ### Authorization @@ -446,7 +463,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -472,7 +489,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -487,10 +504,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **folderId** | **int64**| Id of the folder | - **optional** | ***ContactsApiGetFolderListsOpts** | optional parameters | nil if no parameters + **optional** | ***GetFolderListsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ContactsApiGetFolderListsOpts struct +Optional parameters are passed through a pointer to a GetFolderListsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -508,7 +526,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -524,10 +542,11 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **limit** | **int64**| Number of documents per page | [default to 10] **offset** | **int64**| Index of the first document of the page | [default to 0] - **optional** | ***ContactsApiGetFoldersOpts** | optional parameters | nil if no parameters + **optional** | ***GetFoldersOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ContactsApiGetFoldersOpts struct +Optional parameters are passed through a pointer to a GetFoldersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -544,7 +563,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -570,7 +589,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -584,10 +603,11 @@ Get all the lists Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ContactsApiGetListsOpts** | optional parameters | nil if no parameters + **optional** | ***GetListsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ContactsApiGetListsOpts struct +Optional parameters are passed through a pointer to a GetListsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number of documents per page | [default to 10] @@ -604,13 +624,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **ImportContacts** -> CreatedProcessId ImportContacts(ctx, body) +> CreatedProcessId ImportContacts(ctx, requestContactImport) Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. @@ -620,7 +640,7 @@ It returns the background process ID which on completion calls the notify URL th Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**RequestContactImport**](RequestContactImport.md)| Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` | + **requestContactImport** | [**RequestContactImport**](RequestContactImport.md)| Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` | ### Return type @@ -638,7 +658,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RemoveContactFromList** -> PostContactInfo RemoveContactFromList(ctx, body, listId) +> PostContactInfo RemoveContactFromList(ctx, listId, contactEmails) Delete a contact from a list ### Required Parameters @@ -646,8 +666,8 @@ Delete a contact from a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | **listId** | **int64**| Id of the list | + **contactEmails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | ### Return type @@ -665,7 +685,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RequestContactExport** -> CreatedProcessId RequestContactExport(ctx, body) +> CreatedProcessId RequestContactExport(ctx, requestContactExport) Export contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. @@ -675,7 +695,7 @@ It returns the background process ID which on completion calls the notify URL th Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**RequestContactExport**](RequestContactExport.md)| Values to request a contact export | + **requestContactExport** | [**RequestContactExport**](RequestContactExport.md)| Values to request a contact export | ### Return type @@ -693,7 +713,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateAttribute** -> UpdateAttribute(ctx, body, attributeCategory, attributeName) +> UpdateAttribute(ctx, attributeCategory, attributeName, updateAttribute) Update contact attribute ### Required Parameters @@ -701,9 +721,35 @@ Update contact attribute Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | **attributeCategory** | **string**| Category of the attribute | **attributeName** | **string**| Name of the existing attribute | + **updateAttribute** | [**UpdateAttribute**](UpdateAttribute.md)| Values to update an attribute | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateBatchContacts** +> UpdateBatchContacts(ctx, updateBatchContacts) +Update multiple contacts + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **updateBatchContacts** | [**UpdateBatchContacts**](UpdateBatchContacts.md)| Values to update multiple contacts | ### Return type @@ -721,7 +767,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateContact** -> UpdateContact(ctx, body, identifier) +> UpdateContact(ctx, identifier, updateContact) Update a contact ### Required Parameters @@ -729,8 +775,8 @@ Update a contact Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateContact**](UpdateContact.md)| Values to update a contact | **identifier** | **string**| Email (urlencoded) OR ID of the contact | + **updateContact** | [**UpdateContact**](UpdateContact.md)| Values to update a contact | ### Return type @@ -748,7 +794,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateFolder** -> UpdateFolder(ctx, body, folderId) +> UpdateFolder(ctx, folderId, updateFolder) Update a folder ### Required Parameters @@ -756,8 +802,8 @@ Update a folder Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | **folderId** | **int64**| Id of the folder | + **updateFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | ### Return type @@ -775,7 +821,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateList** -> UpdateList(ctx, body, listId) +> UpdateList(ctx, listId, updateList) Update a list ### Required Parameters @@ -783,8 +829,8 @@ Update a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateList**](UpdateList.md)| Values to update a list | **listId** | **int64**| Id of the list | + **updateList** | [**UpdateList**](UpdateList.md)| Values to update a list | ### Return type diff --git a/docs/CreateAttribute.md b/docs/CreateAttribute.md index 1557ae5..bdb5f60 100644 --- a/docs/CreateAttribute.md +++ b/docs/CreateAttribute.md @@ -3,9 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] -**Enumeration** | [**[]CreateAttributeEnumeration**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] [default to null] -**Type_** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] [default to null] +**Value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] +**Enumeration** | [**[]CreateAttributeEnumeration**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] [default to null] +**Type_** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateAttributeEnumeration.md b/docs/CreateAttributeEnumeration.md index 50c38dd..15dfbe0 100644 --- a/docs/CreateAttributeEnumeration.md +++ b/docs/CreateAttributeEnumeration.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateChild.md b/docs/CreateChild.md index 26c1f94..eb4c635 100644 --- a/docs/CreateChild.md +++ b/docs/CreateChild.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateContact.md b/docs/CreateContact.md index e6d5bae..cea3eb3 100644 --- a/docs/CreateContact.md +++ b/docs/CreateContact.md @@ -4,12 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] [default to null] -**Attributes** | [***interface{}**](interface{}.md) | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} | [optional] [default to null] **EmailBlacklisted** | **bool** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] [default to null] **SmsBlacklisted** | **bool** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] [default to null] **ListIds** | **[]int64** | Ids of the lists to add the contact to | [optional] [default to null] -**UpdateEnabled** | **bool** | Facilitate to update the existing contact in the same request (updateEnabled = true) | [optional] [default to false] +**UpdateEnabled** | **bool** | Facilitate to update the existing contact in the same request (updateEnabled = true) | [optional] [default to null] **SmtpBlacklistSender** | **[]string** | transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateDoiContact.md b/docs/CreateDoiContact.md index 7525387..62075c6 100644 --- a/docs/CreateDoiContact.md +++ b/docs/CreateDoiContact.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Email** | **string** | Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. | [default to null] -**Attributes** | [***interface{}**](interface{}.md) | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} | [optional] [default to null] **IncludeListIds** | **[]int64** | Lists under user account where contact should be added | [default to null] **ExcludeListIds** | **[]int64** | Lists under user account where contact should not be added | [optional] [default to null] **TemplateId** | **int64** | Id of the Double opt-in (DOI) template | [default to null] @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateEmailCampaign.md b/docs/CreateEmailCampaign.md index 7d4ceae..8720aeb 100644 --- a/docs/CreateEmailCampaign.md +++ b/docs/CreateEmailCampaign.md @@ -8,29 +8,30 @@ Name | Type | Description | Notes **Name** | **string** | Name of the campaign | [default to null] **HtmlContent** | **string** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional] [default to null] **HtmlUrl** | **string** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional] [default to null] -**TemplateId** | **int64** | Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional] [default to null] +**TemplateId** | **int64** | Mandatory if htmlContent and htmlUrl are empty. Id of the transactional email template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional] [default to null] **ScheduledAt** | **string** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] [default to null] **Subject** | **string** | Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. | [optional] [default to null] **ReplyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] [default to null] -**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] -**Recipients** | [***CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional] [default to null] +**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] +**Recipients** | [***CreateEmailCampaignRecipients**](createEmailCampaign_recipients.md) | | [optional] [default to null] **AttachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] [default to null] -**InlineImageActivation** | **bool** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false] +**InlineImageActivation** | **bool** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to null] **MirrorActive** | **bool** | Use true to enable the mirror link | [optional] [default to null] **Footer** | **string** | Footer of the email campaign | [optional] [default to null] **Header** | **string** | Header of the email campaign | [optional] [default to null] **UtmCampaign** | **string** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional] [default to null] -**Params** | [***interface{}**](interface{}.md) | Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] [default to null] -**SendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. | [optional] [default to false] -**AbTesting** | **bool** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to false] +**Params** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] [default to null] +**SendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. | [optional] [default to null] +**AbTesting** | **bool** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to null] **SubjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] **SubjectB** | **string** | Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] -**SplitRule** | **int64** | Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] [default to null] -**WinnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed | [optional] [default to null] -**WinnerDelay** | **int64** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed | [optional] [default to null] -**IpWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] +**SplitRule** | **int64** | Add the size of your test groups. Mandatory if abTesting = true & 'recipients' is passed. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] [default to null] +**WinnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed | [optional] [default to null] +**WinnerDelay** | **int64** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Mandatory if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed | [optional] [default to null] +**IpWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to null] **InitialQuota** | **int64** | Mandatory if ipWarmupEnable is set to true. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] [default to null] **IncreaseRate** | **int64** | Mandatory if ipWarmupEnable is set to true. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateEmailCampaignRecipients.md b/docs/CreateEmailCampaignRecipients.md index efe4a22..baeec99 100644 --- a/docs/CreateEmailCampaignRecipients.md +++ b/docs/CreateEmailCampaignRecipients.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateEmailCampaignSender.md b/docs/CreateEmailCampaignSender.md index d1a03aa..4f6832c 100644 --- a/docs/CreateEmailCampaignSender.md +++ b/docs/CreateEmailCampaignSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateList.md b/docs/CreateList.md index 5864b48..aa2550c 100644 --- a/docs/CreateList.md +++ b/docs/CreateList.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateModel.md b/docs/CreateModel.md index 04e4397..6e6216d 100644 --- a/docs/CreateModel.md +++ b/docs/CreateModel.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateReseller.md b/docs/CreateReseller.md index 730c30c..883cbbf 100644 --- a/docs/CreateReseller.md +++ b/docs/CreateReseller.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSender.md b/docs/CreateSender.md index 9276479..33119d3 100644 --- a/docs/CreateSender.md +++ b/docs/CreateSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSenderIps.md b/docs/CreateSenderIps.md index b40be67..6797ff7 100644 --- a/docs/CreateSenderIps.md +++ b/docs/CreateSenderIps.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Ip** | **string** | Dedicated IP available in your account | [default to null] **Domain** | **string** | Domain of the IP | [default to null] -**Weight** | **int64** | Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. | [optional] [default to null] +**Weight** | **int64** | Weight to apply to the IP. Sum of all IP weights must be 100. Should be passed for either ALL or NONE of the IPs. If it's not passed, the sending will be equally balanced on all IPs. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSenderModel.md b/docs/CreateSenderModel.md index 94a837f..1f9d353 100644 --- a/docs/CreateSenderModel.md +++ b/docs/CreateSenderModel.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmsCampaign.md b/docs/CreateSmsCampaign.md index 40cfbc4..7dbd11f 100644 --- a/docs/CreateSmsCampaign.md +++ b/docs/CreateSmsCampaign.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **Content** | **string** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | [default to null] **Recipients** | [***CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] [default to null] **ScheduledAt** | **string** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] [default to null] +**UnicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmsCampaignRecipients.md b/docs/CreateSmsCampaignRecipients.md index b76235f..d15987c 100644 --- a/docs/CreateSmsCampaignRecipients.md +++ b/docs/CreateSmsCampaignRecipients.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmtpEmail.md b/docs/CreateSmtpEmail.md index cffccb7..0179f4d 100644 --- a/docs/CreateSmtpEmail.md +++ b/docs/CreateSmtpEmail.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmtpTemplate.md b/docs/CreateSmtpTemplate.md index 918b7aa..1de4b8d 100644 --- a/docs/CreateSmtpTemplate.md +++ b/docs/CreateSmtpTemplate.md @@ -10,9 +10,10 @@ Name | Type | Description | Notes **HtmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] [default to null] **Subject** | **string** | Subject of the template | [default to null] **ReplyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] [default to null] -**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] +**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] **AttachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] [default to null] **IsActive** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSmtpTemplateSender.md b/docs/CreateSmtpTemplateSender.md index af32b6d..100c7ab 100644 --- a/docs/CreateSmtpTemplateSender.md +++ b/docs/CreateSmtpTemplateSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateSubAccount.md b/docs/CreateSubAccount.md new file mode 100644 index 0000000..f72fae9 --- /dev/null +++ b/docs/CreateSubAccount.md @@ -0,0 +1,13 @@ +# CreateSubAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CompanyName** | **string** | Set the name of the sub-account company | [default to null] +**Email** | **string** | Email address for the organization | [default to null] +**Language** | **string** | Set the language of the sub-account | [optional] [default to null] +**Timezone** | **string** | Set the timezone of the sub-account | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateSubAccountResponse.md b/docs/CreateSubAccountResponse.md new file mode 100644 index 0000000..b6289bd --- /dev/null +++ b/docs/CreateSubAccountResponse.md @@ -0,0 +1,10 @@ +# CreateSubAccountResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | ID of the sub-account created | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUpdateContactModel.md b/docs/CreateUpdateContactModel.md index b4752b1..3a4bbee 100644 --- a/docs/CreateUpdateContactModel.md +++ b/docs/CreateUpdateContactModel.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateUpdateFolder.md b/docs/CreateUpdateFolder.md index 0172a19..ade08ca 100644 --- a/docs/CreateUpdateFolder.md +++ b/docs/CreateUpdateFolder.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreateWebhook.md b/docs/CreateWebhook.md index 1e714de..b6d5b41 100644 --- a/docs/CreateWebhook.md +++ b/docs/CreateWebhook.md @@ -5,8 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Url** | **string** | URL of the webhook | [default to null] **Description** | **string** | Description of the webhook | [optional] [default to null] -**Events** | **[]string** | Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` | [default to null] -**Type_** | **string** | Type of the webhook | [optional] [default to TYPE_.TRANSACTIONAL] +**Events** | **[]string** | - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` | [default to null] +**Type_** | **string** | Type of the webhook | [optional] [default to null] +**Domain** | **string** | Inbound domain of webhook, required in case of event type `inbound` | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/CreatedProcessId.md b/docs/CreatedProcessId.md index 5316eab..ec44881 100644 --- a/docs/CreatedProcessId.md +++ b/docs/CreatedProcessId.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Deal.md b/docs/Deal.md new file mode 100644 index 0000000..c763752 --- /dev/null +++ b/docs/Deal.md @@ -0,0 +1,13 @@ +# Deal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique deal id | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Deal attributes with values | [optional] [default to null] +**LinkedContactsIds** | **[]int32** | Contact ids for contacts linked to this deal | [optional] [default to null] +**LinkedCompaniesIds** | **[]string** | Companies ids for companies linked to this deal | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DealAttributes.md b/docs/DealAttributes.md new file mode 100644 index 0000000..babf754 --- /dev/null +++ b/docs/DealAttributes.md @@ -0,0 +1,9 @@ +# DealAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DealAttributesInner.md b/docs/DealAttributesInner.md new file mode 100644 index 0000000..3638ed4 --- /dev/null +++ b/docs/DealAttributesInner.md @@ -0,0 +1,14 @@ +# DealAttributesInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**InternalName** | **string** | | [optional] [default to null] +**Label** | **string** | | [optional] [default to null] +**AttributeTypeName** | **string** | | [optional] [default to null] +**AttributeOptions** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] +**IsRequired** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DealsApi.md b/docs/DealsApi.md new file mode 100644 index 0000000..e69112a --- /dev/null +++ b/docs/DealsApi.md @@ -0,0 +1,203 @@ +# \DealsApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CrmAttributesDealsGet**](DealsApi.md#CrmAttributesDealsGet) | **Get** /crm/attributes/deals | Get deal attributes +[**CrmDealsGet**](DealsApi.md#CrmDealsGet) | **Get** /crm/deals | Get all deals +[**CrmDealsIdDelete**](DealsApi.md#CrmDealsIdDelete) | **Delete** /crm/deals/{id} | Delete a deal +[**CrmDealsIdGet**](DealsApi.md#CrmDealsIdGet) | **Get** /crm/deals/{id} | Get a deal +[**CrmDealsIdPatch**](DealsApi.md#CrmDealsIdPatch) | **Patch** /crm/deals/{id} | Update a deal +[**CrmDealsPost**](DealsApi.md#CrmDealsPost) | **Post** /crm/deals | Create a deal +[**CrmPipelineDetailsGet**](DealsApi.md#CrmPipelineDetailsGet) | **Get** /crm/pipeline/details | Get pipeline stages + + +# **CrmAttributesDealsGet** +> DealAttributes CrmAttributesDealsGet(ctx, ) +Get deal attributes + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**DealAttributes**](DealAttributes.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmDealsGet** +> DealsList CrmDealsGet(ctx, optional) +Get all deals + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***CrmDealsGetOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a CrmDealsGetOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filterAttributes** | **optional.String**| Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" | + **filterLinkedCompaniesIds** | **optional.String**| Filter by linked companies ids | + **filterLinkedContactsIds** | **optional.String**| Filter by linked companies ids | + **offset** | **optional.Int64**| Index of the first document of the page | + **limit** | **optional.Int64**| Number of documents per page | [default to 50] + **sort** | **optional.String**| Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed | + **sortBy** | **optional.String**| The field used to sort field names. | + +### Return type + +[**DealsList**](DealsList.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmDealsIdDelete** +> CrmDealsIdDelete(ctx, id) +Delete a deal + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmDealsIdGet** +> Deal CrmDealsIdGet(ctx, id) +Get a deal + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + +### Return type + +[**Deal**](Deal.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmDealsIdPatch** +> CrmDealsIdPatch(ctx, id, body) +Update a deal + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **string**| | + **body** | [**Body1**](Body1.md)| Updated deal details. | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmDealsPost** +> InlineResponse201 CrmDealsPost(ctx, body) +Create a deal + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**Body**](Body.md)| Deal create data. | + +### Return type + +[**InlineResponse201**](InlineResponse201.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CrmPipelineDetailsGet** +> Pipeline CrmPipelineDetailsGet(ctx, ) +Get pipeline stages + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**Pipeline**](Pipeline.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/DealsList.md b/docs/DealsList.md new file mode 100644 index 0000000..259190d --- /dev/null +++ b/docs/DealsList.md @@ -0,0 +1,10 @@ +# DealsList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]Deal**](Deal.md) | List of deals | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteHardbounces.md b/docs/DeleteHardbounces.md index 71c956f..bb81f46 100644 --- a/docs/DeleteHardbounces.md +++ b/docs/DeleteHardbounces.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/EmailCampaignsApi.md b/docs/EmailCampaignsApi.md index bb1b547..649b36b 100644 --- a/docs/EmailCampaignsApi.md +++ b/docs/EmailCampaignsApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.EmailCampaignsApi +# \EmailCampaignsApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -16,10 +16,11 @@ Method | HTTP request | Description [**SendTestEmail**](EmailCampaignsApi.md#SendTestEmail) | **Post** /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list [**UpdateCampaignStatus**](EmailCampaignsApi.md#UpdateCampaignStatus) | **Put** /emailCampaigns/{campaignId}/status | Update an email campaign status [**UpdateEmailCampaign**](EmailCampaignsApi.md#UpdateEmailCampaign) | **Put** /emailCampaigns/{campaignId} | Update an email campaign -[**UploadImageToGallery**](EmailCampaignsApi.md#UploadImageToGallery) | **Post** /emailCampaigns/images | Upload an image to your account's image gallery +[**UploadImageToGallery**](EmailCampaignsApi.md#UploadImageToGallery) | **Post** /emailCampaigns/images | Upload an image to your account's image gallery + # **CreateEmailCampaign** -> CreateModel CreateEmailCampaign(ctx, body) +> CreateModel CreateEmailCampaign(ctx, emailCampaigns) Create an email campaign ### Required Parameters @@ -27,11 +28,11 @@ Create an email campaign Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateEmailCampaign**](CreateEmailCampaign.md)| Values to create a campaign | + **emailCampaigns** | [**CreateEmailCampaign**](CreateEmailCampaign.md)| Values to create a campaign | ### Return type -[**CreateModel**](createModel.md) +[**CreateModel**](CreateModel.md) ### Authorization @@ -65,7 +66,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -80,14 +81,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **campaignId** | **int64**| Id of the campaign | - **optional** | ***EmailCampaignsApiEmailExportRecipientsOpts** | optional parameters | nil if no parameters + **optional** | ***EmailExportRecipientsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a EmailCampaignsApiEmailExportRecipientsOpts struct +Optional parameters are passed through a pointer to a EmailExportRecipientsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of EmailExportRecipients**](EmailExportRecipients.md)| Values to send for a recipient export request | + **recipientExport** | [**optional.Interface of EmailExportRecipients**](EmailExportRecipients.md)| Values to send for a recipient export request | ### Return type @@ -127,7 +129,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -153,7 +155,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -167,17 +169,18 @@ Return all your created email campaigns Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***EmailCampaignsApiGetEmailCampaignsOpts** | optional parameters | nil if no parameters + **optional** | ***GetEmailCampaignsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a EmailCampaignsApiGetEmailCampaignsOpts struct +Optional parameters are passed through a pointer to a GetEmailCampaignsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **type_** | **optional.String**| Filter on the type of the campaigns | **status** | **optional.String**| Filter on the status of the campaign | - **startDate** | **optional.String**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | - **endDate** | **optional.String**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | - **limit** | **optional.Int64**| Number of documents per page | [default to 500] + **startDate** | **optional.String**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | + **endDate** | **optional.String**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | + **limit** | **optional.Int64**| Number of documents per page | [default to 50] **offset** | **optional.Int64**| Index of the first document in the page | [default to 0] **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] @@ -191,8 +194,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json, applications/json + - **Content-Type**: application/json + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -219,7 +222,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -245,13 +248,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendReport** -> SendReport(ctx, body, campaignId) +> SendReport(ctx, campaignId, sendReport) Send the report of a campaign A PDF will be sent to the specified email addresses @@ -261,8 +264,8 @@ A PDF will be sent to the specified email addresses Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendReport**](SendReport.md)| Values for send a report | **campaignId** | **int64**| Id of the campaign | + **sendReport** | [**SendReport**](SendReport.md)| Values for send a report | ### Return type @@ -280,7 +283,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendTestEmail** -> SendTestEmail(ctx, body, campaignId) +> SendTestEmail(ctx, campaignId, emailTo) Send an email campaign to your test list ### Required Parameters @@ -288,8 +291,8 @@ Send an email campaign to your test list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendTestEmail**](SendTestEmail.md)| | **campaignId** | **int64**| Id of the campaign | + **emailTo** | [**SendTestEmail**](SendTestEmail.md)| | ### Return type @@ -307,7 +310,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateCampaignStatus** -> UpdateCampaignStatus(ctx, body, campaignId) +> UpdateCampaignStatus(ctx, campaignId, status) Update an email campaign status ### Required Parameters @@ -315,8 +318,8 @@ Update an email campaign status Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign | **campaignId** | **int64**| Id of the campaign | + **status** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign | ### Return type @@ -334,7 +337,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateEmailCampaign** -> UpdateEmailCampaign(ctx, body, campaignId) +> UpdateEmailCampaign(ctx, campaignId, emailCampaign) Update an email campaign ### Required Parameters @@ -342,8 +345,8 @@ Update an email campaign Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateEmailCampaign**](UpdateEmailCampaign.md)| Values to update a campaign | **campaignId** | **int64**| Id of the campaign | + **emailCampaign** | [**UpdateEmailCampaign**](UpdateEmailCampaign.md)| Values to update a campaign | ### Return type @@ -361,7 +364,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UploadImageToGallery** -> UploadImageToGallery(ctx, body) +> UploadImageToGallery(ctx, uploadImage) Upload an image to your account's image gallery ### Required Parameters @@ -369,7 +372,7 @@ Upload an image to your account's image gallery Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UploadImageToGallery**](UploadImageToGallery.md)| Parameters to upload an image | + **uploadImage** | [**UploadImageToGallery**](UploadImageToGallery.md)| Parameters to upload an image | ### Return type diff --git a/docs/EmailExportRecipients.md b/docs/EmailExportRecipients.md index 02b70c1..23bcbdf 100644 --- a/docs/EmailExportRecipients.md +++ b/docs/EmailExportRecipients.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ErrorModel.md b/docs/ErrorModel.md index 4c68e4d..1742c8d 100644 --- a/docs/ErrorModel.md +++ b/docs/ErrorModel.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FoldersApi.md b/docs/FoldersApi.md index f958059..ab464b6 100644 --- a/docs/FoldersApi.md +++ b/docs/FoldersApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.FoldersApi +# \FoldersApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -6,13 +6,14 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateFolder**](FoldersApi.md#CreateFolder) | **Post** /contacts/folders | Create a folder [**DeleteFolder**](FoldersApi.md#DeleteFolder) | **Delete** /contacts/folders/{folderId} | Delete a folder (and all its lists) -[**GetFolder**](FoldersApi.md#GetFolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details +[**GetFolder**](FoldersApi.md#GetFolder) | **Get** /contacts/folders/{folderId} | Returns a folder's details [**GetFolderLists**](FoldersApi.md#GetFolderLists) | **Get** /contacts/folders/{folderId}/lists | Get lists in a folder [**GetFolders**](FoldersApi.md#GetFolders) | **Get** /contacts/folders | Get all folders [**UpdateFolder**](FoldersApi.md#UpdateFolder) | **Put** /contacts/folders/{folderId} | Update a folder + # **CreateFolder** -> CreateModel CreateFolder(ctx, body) +> CreateModel CreateFolder(ctx, createFolder) Create a folder ### Required Parameters @@ -20,7 +21,7 @@ Create a folder Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | + **createFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | ### Return type @@ -58,7 +59,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -84,7 +85,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -99,10 +100,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **folderId** | **int64**| Id of the folder | - **optional** | ***FoldersApiGetFolderListsOpts** | optional parameters | nil if no parameters + **optional** | ***GetFolderListsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a FoldersApiGetFolderListsOpts struct +Optional parameters are passed through a pointer to a GetFolderListsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -120,7 +122,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -136,10 +138,11 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **limit** | **int64**| Number of documents per page | [default to 10] **offset** | **int64**| Index of the first document of the page | [default to 0] - **optional** | ***FoldersApiGetFoldersOpts** | optional parameters | nil if no parameters + **optional** | ***GetFoldersOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a FoldersApiGetFoldersOpts struct +Optional parameters are passed through a pointer to a GetFoldersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -156,13 +159,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateFolder** -> UpdateFolder(ctx, body, folderId) +> UpdateFolder(ctx, folderId, updateFolder) Update a folder ### Required Parameters @@ -170,8 +173,8 @@ Update a folder Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | **folderId** | **int64**| Id of the folder | + **updateFolder** | [**CreateUpdateFolder**](CreateUpdateFolder.md)| Name of the folder | ### Return type diff --git a/docs/GetAccount.md b/docs/GetAccount.md index 4733537..0014a89 100644 --- a/docs/GetAccount.md +++ b/docs/GetAccount.md @@ -3,6 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Email** | **string** | Login Email | [default to null] +**FirstName** | **string** | First Name | [default to null] +**LastName** | **string** | Last Name | [default to null] +**CompanyName** | **string** | Name of the company | [default to null] **Address** | [***GetExtendedClientAddress**](GetExtendedClientAddress.md) | | [default to null] **Plan** | [**[]GetAccountPlan**](GetAccountPlan.md) | Information about your plans and credits | [default to null] **Relay** | [***GetAccountRelay**](GetAccountRelay.md) | | [default to null] @@ -10,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountMarketingAutomation.md b/docs/GetAccountMarketingAutomation.md index 29e05d5..fe53900 100644 --- a/docs/GetAccountMarketingAutomation.md +++ b/docs/GetAccountMarketingAutomation.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountPlan.md b/docs/GetAccountPlan.md index a42113b..3144983 100644 --- a/docs/GetAccountPlan.md +++ b/docs/GetAccountPlan.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountRelay.md b/docs/GetAccountRelay.md index 91f0bfd..4325cf6 100644 --- a/docs/GetAccountRelay.md +++ b/docs/GetAccountRelay.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAccountRelayData.md b/docs/GetAccountRelayData.md index d9bff83..f11c636 100644 --- a/docs/GetAccountRelayData.md +++ b/docs/GetAccountRelayData.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAggregatedReport.md b/docs/GetAggregatedReport.md index 33ce36d..7b214b4 100644 --- a/docs/GetAggregatedReport.md +++ b/docs/GetAggregatedReport.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAttributes.md b/docs/GetAttributes.md index f2dca03..3d4923b 100644 --- a/docs/GetAttributes.md +++ b/docs/GetAttributes.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAttributesAttributes.md b/docs/GetAttributesAttributes.md index 522d60b..169d3c5 100644 --- a/docs/GetAttributesAttributes.md +++ b/docs/GetAttributesAttributes.md @@ -6,8 +6,9 @@ Name | Type | Description | Notes **Name** | **string** | Name of the attribute | [default to null] **Category** | **string** | Category of the attribute | [default to null] **Type_** | **string** | Type of the attribute | [optional] [default to null] -**Enumeration** | [**[]GetAttributesEnumeration**](GetAttributesEnumeration.md) | Parameter only available for \"category\" type attributes. | [optional] [default to null] +**Enumeration** | [**[]GetAttributesEnumeration**](getAttributes_enumeration.md) | Parameter only available for \"category\" type attributes. | [optional] [default to null] **CalculatedValue** | **string** | Calculated value formula | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetAttributesEnumeration.md b/docs/GetAttributesEnumeration.md index 0999358..4c685c6 100644 --- a/docs/GetAttributesEnumeration.md +++ b/docs/GetAttributesEnumeration.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetBlockedDomains.md b/docs/GetBlockedDomains.md index ef11ad8..970e312 100644 --- a/docs/GetBlockedDomains.md +++ b/docs/GetBlockedDomains.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetCampaignOverview.md b/docs/GetCampaignOverview.md index 848b47c..768b333 100644 --- a/docs/GetCampaignOverview.md +++ b/docs/GetCampaignOverview.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetCampaignRecipients.md b/docs/GetCampaignRecipients.md index f95e26a..36ca800 100644 --- a/docs/GetCampaignRecipients.md +++ b/docs/GetCampaignRecipients.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetCampaignStats.md b/docs/GetCampaignStats.md index 187d1be..5951b64 100644 --- a/docs/GetCampaignStats.md +++ b/docs/GetCampaignStats.md @@ -12,6 +12,9 @@ Name | Type | Description | Notes **SoftBounces** | **int64** | Number of softbounce for the campaign | [default to null] **HardBounces** | **int64** | Number of harbounce for the campaign | [default to null] **UniqueViews** | **int64** | Number of unique openings for the campaign | [default to null] +**TrackableViews** | **int64** | Recipients without any privacy protection option enabled in their email client | [default to null] +**TrackableViewsRate** | **float32** | Rate of recipients without any privacy protection option enabled in their email client | [optional] [default to null] +**EstimatedViews** | **int64** | Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails | [optional] [default to null] **Unsubscriptions** | **int64** | Number of unsubscription for the campaign | [default to null] **Viewed** | **int64** | Number of openings for the campaign | [default to null] **Deferred** | **int64** | Number of deferred emails for the campaign | [optional] [default to null] @@ -19,3 +22,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildAccountCreationStatus.md b/docs/GetChildAccountCreationStatus.md index d0cfd89..92a4dd3 100644 --- a/docs/GetChildAccountCreationStatus.md +++ b/docs/GetChildAccountCreationStatus.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildDomain.md b/docs/GetChildDomain.md index 2d4b892..ba050dd 100644 --- a/docs/GetChildDomain.md +++ b/docs/GetChildDomain.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildDomains.md b/docs/GetChildDomains.md new file mode 100644 index 0000000..7632c58 --- /dev/null +++ b/docs/GetChildDomains.md @@ -0,0 +1,9 @@ +# GetChildDomains + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetChildInfo.md b/docs/GetChildInfo.md index f32a088..36f19f6 100644 --- a/docs/GetChildInfo.md +++ b/docs/GetChildInfo.md @@ -15,3 +15,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoApiKeys.md b/docs/GetChildInfoApiKeys.md index c912f66..392734e 100644 --- a/docs/GetChildInfoApiKeys.md +++ b/docs/GetChildInfoApiKeys.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoApiKeysV2.md b/docs/GetChildInfoApiKeysV2.md index 4263647..1217252 100644 --- a/docs/GetChildInfoApiKeysV2.md +++ b/docs/GetChildInfoApiKeysV2.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoApiKeysV3.md b/docs/GetChildInfoApiKeysV3.md index 6639e9e..3bbbfc6 100644 --- a/docs/GetChildInfoApiKeysV3.md +++ b/docs/GetChildInfoApiKeysV3.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoCredits.md b/docs/GetChildInfoCredits.md index 9fe969e..02aeff5 100644 --- a/docs/GetChildInfoCredits.md +++ b/docs/GetChildInfoCredits.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildInfoStatistics.md b/docs/GetChildInfoStatistics.md index a44344a..f2f497c 100644 --- a/docs/GetChildInfoStatistics.md +++ b/docs/GetChildInfoStatistics.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetChildrenList.md b/docs/GetChildrenList.md index 2fd345d..2a5d46b 100644 --- a/docs/GetChildrenList.md +++ b/docs/GetChildrenList.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Children** | [**[]AllOfgetChildrenListChildrenItems**](interface{}.md) | Your children's account information | [optional] [default to null] +**Children** | [**[]interface{}**](interface{}.md) | Your children's account information | [optional] [default to null] **Count** | **int64** | Number of child accounts | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetClient.md b/docs/GetClient.md index 8118ecf..dee9fbc 100644 --- a/docs/GetClient.md +++ b/docs/GetClient.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStats.md b/docs/GetContactCampaignStats.md index 5993444..4988628 100644 --- a/docs/GetContactCampaignStats.md +++ b/docs/GetContactCampaignStats.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **Opened** | [**[]GetContactCampaignStatsOpened**](GetContactCampaignStatsOpened.md) | | [optional] [default to null] **Clicked** | [**[]GetContactCampaignStatsClicked**](GetContactCampaignStatsClicked.md) | | [optional] [default to null] **TransacAttributes** | [**[]GetContactCampaignStatsTransacAttributes**](GetContactCampaignStatsTransacAttributes.md) | | [optional] [default to null] +**Delivered** | [**[]GetExtendedContactDetailsStatisticsMessagesSent**](GetExtendedContactDetailsStatisticsMessagesSent.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsClicked.md b/docs/GetContactCampaignStatsClicked.md index eb445dd..82cdc32 100644 --- a/docs/GetContactCampaignStatsClicked.md +++ b/docs/GetContactCampaignStatsClicked.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsOpened.md b/docs/GetContactCampaignStatsOpened.md index 60cf8c5..f391ac2 100644 --- a/docs/GetContactCampaignStatsOpened.md +++ b/docs/GetContactCampaignStatsOpened.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsTransacAttributes.md b/docs/GetContactCampaignStatsTransacAttributes.md index f04abb3..9855e82 100644 --- a/docs/GetContactCampaignStatsTransacAttributes.md +++ b/docs/GetContactCampaignStatsTransacAttributes.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactCampaignStatsUnsubscriptions.md b/docs/GetContactCampaignStatsUnsubscriptions.md index 3a853a5..2c61ffc 100644 --- a/docs/GetContactCampaignStatsUnsubscriptions.md +++ b/docs/GetContactCampaignStatsUnsubscriptions.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContactDetails.md b/docs/GetContactDetails.md index 2d1bb04..6388cf4 100644 --- a/docs/GetContactDetails.md +++ b/docs/GetContactDetails.md @@ -11,7 +11,8 @@ Name | Type | Description | Notes **ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ListIds** | **[]int64** | | [default to null] **ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | [***interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetContacts.md b/docs/GetContacts.md index 923e22f..dca1db1 100644 --- a/docs/GetContacts.md +++ b/docs/GetContacts.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Contacts** | [**[]AllOfgetContactsContactsItems**](interface{}.md) | | [default to null] +**Contacts** | [**[]interface{}**](interface{}.md) | | [default to null] **Count** | **int64** | Number of contacts | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetDeviceBrowserStats.md b/docs/GetDeviceBrowserStats.md index 66e95e4..de2541c 100644 --- a/docs/GetDeviceBrowserStats.md +++ b/docs/GetDeviceBrowserStats.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailCampaign.md b/docs/GetEmailCampaign.md index afff08c..80aeed1 100644 --- a/docs/GetEmailCampaign.md +++ b/docs/GetEmailCampaign.md @@ -3,6 +3,19 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Id** | **int64** | ID of the campaign | [default to null] +**Name** | **string** | Name of the campaign | [default to null] +**Subject** | **string** | Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` | [optional] [default to null] +**Type_** | **string** | Type of campaign | [default to null] +**Status** | **string** | Status of the campaign | [default to null] +**ScheduledAt** | **string** | UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional] [default to null] +**AbTesting** | **bool** | Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. | [optional] [default to null] +**SubjectA** | **string** | Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] +**SubjectB** | **string** | Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] +**SplitRule** | **int32** | The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] +**WinnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] +**WinnerDelay** | **int32** | The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` | [optional] [default to null] +**SendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] [default to null] **TestSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | [default to null] **Header** | **string** | Header of the campaign | [default to null] **Footer** | **string** | Footer of the campaign | [default to null] @@ -17,10 +30,11 @@ Name | Type | Description | Notes **InlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] [default to null] **MirrorActive** | **bool** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] [default to null] **Recurring** | **bool** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to null] -**SentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] [default to null] +**SentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] [default to null] **ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] -**Recipients** | [***interface{}**](interface{}.md) | | [default to null] -**Statistics** | [***interface{}**](interface{}.md) | | [default to null] +**Recipients** | [**map[string]interface{}**](interface{}.md) | | [default to null] +**Statistics** | [**map[string]interface{}**](interface{}.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailCampaigns.md b/docs/GetEmailCampaigns.md index 82dd352..33bf0f6 100644 --- a/docs/GetEmailCampaigns.md +++ b/docs/GetEmailCampaigns.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaigns** | [**[]AllOfgetEmailCampaignsCampaignsItems**](interface{}.md) | | [optional] [default to null] +**Campaigns** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] **Count** | **int64** | Number of Email campaigns retrieved | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailEventReport.md b/docs/GetEmailEventReport.md index 79710d6..36f131e 100644 --- a/docs/GetEmailEventReport.md +++ b/docs/GetEmailEventReport.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetEmailEventReportEvents.md b/docs/GetEmailEventReportEvents.md index 921d773..d10d60f 100644 --- a/docs/GetEmailEventReportEvents.md +++ b/docs/GetEmailEventReportEvents.md @@ -17,3 +17,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedCampaignOverview.md b/docs/GetExtendedCampaignOverview.md index 1dc5f9b..55d4ee8 100644 --- a/docs/GetExtendedCampaignOverview.md +++ b/docs/GetExtendedCampaignOverview.md @@ -30,8 +30,9 @@ Name | Type | Description | Notes **InlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] [default to null] **MirrorActive** | **bool** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] [default to null] **Recurring** | **bool** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to null] -**SentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] [default to null] +**SentDate** | **string** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] [default to null] **ReturnBounce** | **int64** | Total number of non-delivered campaigns for a particular campaign id. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedCampaignOverviewSender.md b/docs/GetExtendedCampaignOverviewSender.md index ca07106..6aa7370 100644 --- a/docs/GetExtendedCampaignOverviewSender.md +++ b/docs/GetExtendedCampaignOverviewSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedCampaignStats.md b/docs/GetExtendedCampaignStats.md index 81b8d7d..a3c7985 100644 --- a/docs/GetExtendedCampaignStats.md +++ b/docs/GetExtendedCampaignStats.md @@ -3,14 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GlobalStats** | [***AllOfgetExtendedCampaignStatsGlobalStats**](AllOfgetExtendedCampaignStatsGlobalStats.md) | Overall statistics of the campaign | [default to null] -**CampaignStats** | [**[]AllOfgetExtendedCampaignStatsCampaignStatsItems**](interface{}.md) | List-wise statistics of the campaign. | [default to null] +**GlobalStats** | [**map[string]interface{}**](interface{}.md) | Overall statistics of the campaign | [default to null] +**CampaignStats** | [**[]interface{}**](interface{}.md) | List-wise statistics of the campaign. | [default to null] **MirrorClick** | **int64** | Number of clicks on mirror link | [default to null] **Remaining** | **int64** | Number of remaning emails to send | [default to null] -**LinksStats** | [***interface{}**](interface{}.md) | Statistics about the number of clicks for the links | [default to null] -**StatsByDomain** | [***map[string]GetCampaignStats**](map.md) | | [default to null] -**StatsByDevice** | [***GetStatsByDevice**](GetStatsByDevice.md) | | [default to null] -**StatsByBrowser** | [***map[string]GetDeviceBrowserStats**](map.md) | | [default to null] +**LinksStats** | [**map[string]interface{}**](interface{}.md) | Statistics about the number of clicks for the links | [default to null] +**StatsByDomain** | [***GetStatsByDomain**](GetStatsByDomain.md) | | [default to null] +**StatsByDevice** | [***GetStatsByDevice**](GetStatsByDevice.md) | Statistics about the campaign on the basis of various devices | [default to null] +**StatsByBrowser** | [***GetStatsByBrowser**](GetStatsByBrowser.md) | Statistics about the campaign on the basis of various browsers | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedClient.md b/docs/GetExtendedClient.md index 7fcec20..7e0a54e 100644 --- a/docs/GetExtendedClient.md +++ b/docs/GetExtendedClient.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedClientAddress.md b/docs/GetExtendedClientAddress.md index e4bb278..d42152c 100644 --- a/docs/GetExtendedClientAddress.md +++ b/docs/GetExtendedClientAddress.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetails.md b/docs/GetExtendedContactDetails.md index d4041a5..f208268 100644 --- a/docs/GetExtendedContactDetails.md +++ b/docs/GetExtendedContactDetails.md @@ -11,8 +11,9 @@ Name | Type | Description | Notes **ModifiedAt** | **string** | Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ListIds** | **[]int64** | | [default to null] **ListUnsubscribed** | **[]int64** | | [optional] [default to null] -**Attributes** | [***interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Set of attributes of the contact | [default to null] **Statistics** | [***GetExtendedContactDetailsStatistics**](GetExtendedContactDetailsStatistics.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatistics.md b/docs/GetExtendedContactDetailsStatistics.md index 4e2cff0..86b4bb6 100644 --- a/docs/GetExtendedContactDetailsStatistics.md +++ b/docs/GetExtendedContactDetailsStatistics.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **Opened** | [**[]GetExtendedContactDetailsStatisticsOpened**](GetExtendedContactDetailsStatisticsOpened.md) | Listing of the openings generated by the contact | [optional] [default to null] **Clicked** | [**[]GetExtendedContactDetailsStatisticsClicked**](GetExtendedContactDetailsStatisticsClicked.md) | Listing of the clicks generated by the contact | [optional] [default to null] **TransacAttributes** | [**[]interface{}**](interface{}.md) | Listing of the transactional attributes for the contact | [optional] [default to null] +**Delivered** | [**[]GetExtendedContactDetailsStatisticsDelivered**](GetExtendedContactDetailsStatisticsDelivered.md) | Listing of the delivered campaign for the contact | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsClicked.md b/docs/GetExtendedContactDetailsStatisticsClicked.md index 54138b2..4b64a30 100644 --- a/docs/GetExtendedContactDetailsStatisticsClicked.md +++ b/docs/GetExtendedContactDetailsStatisticsClicked.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsDelivered.md b/docs/GetExtendedContactDetailsStatisticsDelivered.md new file mode 100644 index 0000000..1d73118 --- /dev/null +++ b/docs/GetExtendedContactDetailsStatisticsDelivered.md @@ -0,0 +1,11 @@ +# GetExtendedContactDetailsStatisticsDelivered + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignId** | **int64** | ID of the campaign which generated the event | [default to null] +**EventTime** | **string** | UTC date-time of the event | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetExtendedContactDetailsStatisticsLinks.md b/docs/GetExtendedContactDetailsStatisticsLinks.md index 000d6a1..18d1c92 100644 --- a/docs/GetExtendedContactDetailsStatisticsLinks.md +++ b/docs/GetExtendedContactDetailsStatisticsLinks.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsMessagesSent.md b/docs/GetExtendedContactDetailsStatisticsMessagesSent.md index 13e5f3d..8f1b297 100644 --- a/docs/GetExtendedContactDetailsStatisticsMessagesSent.md +++ b/docs/GetExtendedContactDetailsStatisticsMessagesSent.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsOpened.md b/docs/GetExtendedContactDetailsStatisticsOpened.md index 1ac69c7..6f42df4 100644 --- a/docs/GetExtendedContactDetailsStatisticsOpened.md +++ b/docs/GetExtendedContactDetailsStatisticsOpened.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md index fdef64a..9a9a69b 100644 --- a/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptions.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md index b5b68ca..d5febc2 100644 --- a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md index 3e4bbb9..95f3ee8 100644 --- a/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md +++ b/docs/GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedList.md b/docs/GetExtendedList.md index 5d1dcfe..da16a36 100644 --- a/docs/GetExtendedList.md +++ b/docs/GetExtendedList.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Name** | **string** | Name of the list | [default to null] **TotalBlacklisted** | **int64** | Number of blacklisted contacts in the list | [default to null] **TotalSubscribers** | **int64** | Number of contacts in the list | [default to null] +**UniqueSubscribers** | **int64** | Number of unique contacts in the list | [default to null] **FolderId** | **int64** | ID of the folder | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **CampaignStats** | [**[]GetExtendedListCampaignStats**](GetExtendedListCampaignStats.md) | | [optional] [default to null] @@ -14,3 +15,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetExtendedListCampaignStats.md b/docs/GetExtendedListCampaignStats.md index 7c2aae0..f5c2cce 100644 --- a/docs/GetExtendedListCampaignStats.md +++ b/docs/GetExtendedListCampaignStats.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetFolder.md b/docs/GetFolder.md index 0fcae79..7d88cbd 100644 --- a/docs/GetFolder.md +++ b/docs/GetFolder.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetFolderLists.md b/docs/GetFolderLists.md index ce6be81..a457447 100644 --- a/docs/GetFolderLists.md +++ b/docs/GetFolderLists.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Lists** | [**[]AllOfgetFolderListsListsItems**](interface{}.md) | | [optional] [default to null] +**Lists** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] **Count** | **int64** | Number of lists in the folder | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetFolders.md b/docs/GetFolders.md index 0906597..4597ded 100644 --- a/docs/GetFolders.md +++ b/docs/GetFolders.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Folders** | [**[]AllOfgetFoldersFoldersItems**](interface{}.md) | | [optional] [default to null] +**Folders** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] **Count** | **int64** | Number of folders available in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetInboundEmailEvents.md b/docs/GetInboundEmailEvents.md new file mode 100644 index 0000000..f7a24d4 --- /dev/null +++ b/docs/GetInboundEmailEvents.md @@ -0,0 +1,10 @@ +# GetInboundEmailEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Events** | [**[]GetInboundEmailEventsEvents**](GetInboundEmailEventsEvents.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInboundEmailEventsByUuid.md b/docs/GetInboundEmailEventsByUuid.md new file mode 100644 index 0000000..88eaa2d --- /dev/null +++ b/docs/GetInboundEmailEventsByUuid.md @@ -0,0 +1,17 @@ +# GetInboundEmailEventsByUuid + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ReceivedAt** | [**time.Time**](time.Time.md) | Date when email was received on SMTP relay | [optional] [default to null] +**DeliveredAt** | [**time.Time**](time.Time.md) | Date when email was delivered successfully to client’s webhook | [optional] [default to null] +**Recipient** | **string** | Recipient’s email address | [optional] [default to null] +**Sender** | **string** | Sender’s email address | [optional] [default to null] +**MessageId** | **string** | Value of the Message-ID header. This will be present only after the processing is done. | [optional] [default to null] +**Subject** | **string** | Value of the Subject header. This will be present only after the processing is done. | [optional] [default to null] +**Attachments** | [**[]GetInboundEmailEventsByUuidAttachments**](GetInboundEmailEventsByUuidAttachments.md) | List of attachments of the email. This will be present only after the processing is done. | [optional] [default to null] +**Logs** | [**[]GetInboundEmailEventsByUuidLogs**](GetInboundEmailEventsByUuidLogs.md) | List of events/logs that describe the lifecycle of the email on SIB platform | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInboundEmailEventsByUuidAttachments.md b/docs/GetInboundEmailEventsByUuidAttachments.md new file mode 100644 index 0000000..862c41c --- /dev/null +++ b/docs/GetInboundEmailEventsByUuidAttachments.md @@ -0,0 +1,13 @@ +# GetInboundEmailEventsByUuidAttachments + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | filename specified in the Content-Disposition header of the attachment | [optional] [default to null] +**ContentType** | **string** | value of the Content-Type header of the attachment | [optional] [default to null] +**ContentId** | **string** | value of the Content-ID header of the attachment. | [optional] [default to null] +**ContentLength** | **int32** | size of the attachment in bytes | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInboundEmailEventsByUuidLogs.md b/docs/GetInboundEmailEventsByUuidLogs.md new file mode 100644 index 0000000..bd9fbea --- /dev/null +++ b/docs/GetInboundEmailEventsByUuidLogs.md @@ -0,0 +1,11 @@ +# GetInboundEmailEventsByUuidLogs + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | [**time.Time**](time.Time.md) | Date of the event | [optional] [default to null] +**Type_** | **string** | Type of the event | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetInboundEmailEventsEvents.md b/docs/GetInboundEmailEventsEvents.md new file mode 100644 index 0000000..279c3b0 --- /dev/null +++ b/docs/GetInboundEmailEventsEvents.md @@ -0,0 +1,13 @@ +# GetInboundEmailEventsEvents + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uuid** | **string** | UUID that can be used to fetch additional data | [default to null] +**Date** | [**time.Time**](time.Time.md) | Date when email was received on SMTP relay | [default to null] +**Sender** | **string** | Sender’s email address | [default to null] +**Recipient** | **string** | Recipient’s email address | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetIp.md b/docs/GetIp.md index 1425b76..c5741de 100644 --- a/docs/GetIp.md +++ b/docs/GetIp.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIpFromSender.md b/docs/GetIpFromSender.md index 51b8531..9615543 100644 --- a/docs/GetIpFromSender.md +++ b/docs/GetIpFromSender.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIps.md b/docs/GetIps.md index f529bc3..2a43023 100644 --- a/docs/GetIps.md +++ b/docs/GetIps.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetIpsFromSender.md b/docs/GetIpsFromSender.md index 99ab662..ca892c4 100644 --- a/docs/GetIpsFromSender.md +++ b/docs/GetIpsFromSender.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetList.md b/docs/GetList.md index b9a0a88..4d59ce5 100644 --- a/docs/GetList.md +++ b/docs/GetList.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes **Name** | **string** | Name of the list | [default to null] **TotalBlacklisted** | **int64** | Number of blacklisted contacts in the list | [default to null] **TotalSubscribers** | **int64** | Number of contacts in the list | [default to null] +**UniqueSubscribers** | **int64** | Number of unique contacts in the list | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetLists.md b/docs/GetLists.md index 5784c25..3fd6eaa 100644 --- a/docs/GetLists.md +++ b/docs/GetLists.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Lists** | [**[]AllOfgetListsListsItems**](interface{}.md) | Listing of all the lists available in your account | [optional] [default to null] +**Lists** | [**[]interface{}**](interface{}.md) | Listing of all the lists available in your account | [optional] [default to null] **Count** | **int64** | Number of lists in your account | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetProcess.md b/docs/GetProcess.md index ec15772..b637d02 100644 --- a/docs/GetProcess.md +++ b/docs/GetProcess.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetProcesses.md b/docs/GetProcesses.md index d3f215b..b516f55 100644 --- a/docs/GetProcesses.md +++ b/docs/GetProcesses.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetReports.md b/docs/GetReports.md index cb9b6f8..46a3fb7 100644 --- a/docs/GetReports.md +++ b/docs/GetReports.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetReportsReports.md b/docs/GetReportsReports.md index 33d048b..8abd87f 100644 --- a/docs/GetReportsReports.md +++ b/docs/GetReportsReports.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetScheduledEmailByBatchId.md b/docs/GetScheduledEmailByBatchId.md new file mode 100644 index 0000000..ebd5ffb --- /dev/null +++ b/docs/GetScheduledEmailByBatchId.md @@ -0,0 +1,11 @@ +# GetScheduledEmailByBatchId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **int32** | Total number of batches | [optional] [default to null] +**Batches** | [**[]GetScheduledEmailByBatchIdBatches**](GetScheduledEmailByBatchIdBatches.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetScheduledEmailByBatchIdBatches.md b/docs/GetScheduledEmailByBatchIdBatches.md new file mode 100644 index 0000000..a2392b2 --- /dev/null +++ b/docs/GetScheduledEmailByBatchIdBatches.md @@ -0,0 +1,12 @@ +# GetScheduledEmailByBatchIdBatches + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ScheduledAt** | [**time.Time**](time.Time.md) | Datetime for which the batch was scheduled | [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | Datetime on which the batch was scheduled | [default to null] +**Status** | **string** | Current status of the scheduled batch | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetScheduledEmailByMessageId.md b/docs/GetScheduledEmailByMessageId.md new file mode 100644 index 0000000..b755b63 --- /dev/null +++ b/docs/GetScheduledEmailByMessageId.md @@ -0,0 +1,12 @@ +# GetScheduledEmailByMessageId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ScheduledAt** | [**time.Time**](time.Time.md) | Datetime for which the email was scheduled | [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | Datetime on which the email was scheduled | [default to null] +**Status** | **string** | Current status of the scheduled email | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetSendersList.md b/docs/GetSendersList.md index 5073696..661484a 100644 --- a/docs/GetSendersList.md +++ b/docs/GetSendersList.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSendersListIps.md b/docs/GetSendersListIps.md index 8ab72e4..50e89e0 100644 --- a/docs/GetSendersListIps.md +++ b/docs/GetSendersListIps.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSendersListSenders.md b/docs/GetSendersListSenders.md index 2919619..17de519 100644 --- a/docs/GetSendersListSenders.md +++ b/docs/GetSendersListSenders.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSharedTemplateUrl.md b/docs/GetSharedTemplateUrl.md index f953c35..0200abd 100644 --- a/docs/GetSharedTemplateUrl.md +++ b/docs/GetSharedTemplateUrl.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaign.md b/docs/GetSmsCampaign.md index 80095a6..3a75f38 100644 --- a/docs/GetSmsCampaign.md +++ b/docs/GetSmsCampaign.md @@ -11,8 +11,9 @@ Name | Type | Description | Notes **Sender** | **string** | Sender of the SMS Campaign | [default to null] **CreatedAt** | **string** | Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] **ModifiedAt** | **string** | UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) | [default to null] -**Recipients** | [***interface{}**](interface{}.md) | | [default to null] -**Statistics** | [***interface{}**](interface{}.md) | | [default to null] +**Recipients** | [**map[string]interface{}**](interface{}.md) | | [default to null] +**Statistics** | [**map[string]interface{}**](interface{}.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaignOverview.md b/docs/GetSmsCampaignOverview.md index 9133108..0888ce2 100644 --- a/docs/GetSmsCampaignOverview.md +++ b/docs/GetSmsCampaignOverview.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaignStats.md b/docs/GetSmsCampaignStats.md index f7eb074..0b00c12 100644 --- a/docs/GetSmsCampaignStats.md +++ b/docs/GetSmsCampaignStats.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsCampaigns.md b/docs/GetSmsCampaigns.md index 5c3e576..997d7ff 100644 --- a/docs/GetSmsCampaigns.md +++ b/docs/GetSmsCampaigns.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaigns** | [**[]AllOfgetSmsCampaignsCampaignsItems**](interface{}.md) | | [optional] [default to null] +**Campaigns** | [**[]interface{}**](interface{}.md) | | [optional] [default to null] **Count** | **int64** | Number of SMS campaigns retrieved | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsEventReport.md b/docs/GetSmsEventReport.md index 1469107..23bf6a1 100644 --- a/docs/GetSmsEventReport.md +++ b/docs/GetSmsEventReport.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmsEventReportEvents.md b/docs/GetSmsEventReportEvents.md index 229c722..5da1639 100644 --- a/docs/GetSmsEventReportEvents.md +++ b/docs/GetSmsEventReportEvents.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmtpTemplateOverview.md b/docs/GetSmtpTemplateOverview.md index 11df1e5..c032c21 100644 --- a/docs/GetSmtpTemplateOverview.md +++ b/docs/GetSmtpTemplateOverview.md @@ -19,3 +19,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmtpTemplateOverviewSender.md b/docs/GetSmtpTemplateOverviewSender.md index 06246f6..d6e564a 100644 --- a/docs/GetSmtpTemplateOverviewSender.md +++ b/docs/GetSmtpTemplateOverviewSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSmtpTemplates.md b/docs/GetSmtpTemplates.md index 5995dd6..f3b22b3 100644 --- a/docs/GetSmtpTemplates.md +++ b/docs/GetSmtpTemplates.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetSsoToken.md b/docs/GetSsoToken.md index a872858..7fa34da 100644 --- a/docs/GetSsoToken.md +++ b/docs/GetSsoToken.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Token** | **string** | Session token. It will remain valid for a short period of time only. | [default to null] +**Token** | **string** | Session token, it will remain valid for 15 days. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetStatsByBrowser.md b/docs/GetStatsByBrowser.md new file mode 100644 index 0000000..dfdba22 --- /dev/null +++ b/docs/GetStatsByBrowser.md @@ -0,0 +1,9 @@ +# GetStatsByBrowser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetStatsByDevice.md b/docs/GetStatsByDevice.md index cba7df5..a13bc26 100644 --- a/docs/GetStatsByDevice.md +++ b/docs/GetStatsByDevice.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetStatsByDomain.md b/docs/GetStatsByDomain.md new file mode 100644 index 0000000..bdd4c4b --- /dev/null +++ b/docs/GetStatsByDomain.md @@ -0,0 +1,9 @@ +# GetStatsByDomain + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetTransacAggregatedSmsReport.md b/docs/GetTransacAggregatedSmsReport.md index 5a11344..59cbf59 100644 --- a/docs/GetTransacAggregatedSmsReport.md +++ b/docs/GetTransacAggregatedSmsReport.md @@ -16,3 +16,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacBlockedContacts.md b/docs/GetTransacBlockedContacts.md index 1657bbc..0cd8c82 100644 --- a/docs/GetTransacBlockedContacts.md +++ b/docs/GetTransacBlockedContacts.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacBlockedContactsContacts.md b/docs/GetTransacBlockedContactsContacts.md index bceb3de..cff1a58 100644 --- a/docs/GetTransacBlockedContactsContacts.md +++ b/docs/GetTransacBlockedContactsContacts.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacBlockedContactsReason.md b/docs/GetTransacBlockedContactsReason.md index fa4bec3..e26c043 100644 --- a/docs/GetTransacBlockedContactsReason.md +++ b/docs/GetTransacBlockedContactsReason.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacEmailContent.md b/docs/GetTransacEmailContent.md index 0ee3006..59e9ca0 100644 --- a/docs/GetTransacEmailContent.md +++ b/docs/GetTransacEmailContent.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacEmailContentEvents.md b/docs/GetTransacEmailContentEvents.md index 64e0f56..f8c4d80 100644 --- a/docs/GetTransacEmailContentEvents.md +++ b/docs/GetTransacEmailContentEvents.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacEmailsList.md b/docs/GetTransacEmailsList.md index bce66f7..1d43600 100644 --- a/docs/GetTransacEmailsList.md +++ b/docs/GetTransacEmailsList.md @@ -3,7 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Count** | **int64** | Total number of transactional emails available on your account according to the passed filter | [optional] [default to null] **TransactionalEmails** | [**[]GetTransacEmailsListTransactionalEmails**](GetTransacEmailsListTransactionalEmails.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacEmailsListTransactionalEmails.md b/docs/GetTransacEmailsListTransactionalEmails.md index 731b7cc..89576d7 100644 --- a/docs/GetTransacEmailsListTransactionalEmails.md +++ b/docs/GetTransacEmailsListTransactionalEmails.md @@ -14,3 +14,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacSmsReport.md b/docs/GetTransacSmsReport.md index 0ca1cbe..b0bb93c 100644 --- a/docs/GetTransacSmsReport.md +++ b/docs/GetTransacSmsReport.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetTransacSmsReportReports.md b/docs/GetTransacSmsReportReports.md index 75f77cb..d9b8266 100644 --- a/docs/GetTransacSmsReportReports.md +++ b/docs/GetTransacSmsReportReports.md @@ -16,3 +16,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetWebhook.md b/docs/GetWebhook.md index 0dd5102..100c656 100644 --- a/docs/GetWebhook.md +++ b/docs/GetWebhook.md @@ -13,3 +13,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/GetWebhooks.md b/docs/GetWebhooks.md index 4e834db..e90f98f 100644 --- a/docs/GetWebhooks.md +++ b/docs/GetWebhooks.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Webhooks** | [**[]AllOfgetWebhooksWebhooksItems**](interface{}.md) | | [default to null] +**Webhooks** | [**[]interface{}**](interface{}.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/InboundParsingApi.md b/docs/InboundParsingApi.md new file mode 100644 index 0000000..7bdc0b2 --- /dev/null +++ b/docs/InboundParsingApi.md @@ -0,0 +1,78 @@ +# \InboundParsingApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetInboundEmailEvents**](InboundParsingApi.md#GetInboundEmailEvents) | **Get** /inbound/events | Get the list of all the events for the received emails. +[**GetInboundEmailEventsByUuid**](InboundParsingApi.md#GetInboundEmailEventsByUuid) | **Get** /inbound/events/{uuid} | Fetch all events history for one particular received email. + + +# **GetInboundEmailEvents** +> GetInboundEmailEvents GetInboundEmailEvents(ctx, optional) +Get the list of all the events for the received emails. + +This endpoint will show the list of all the events for the received emails. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **optional** | ***GetInboundEmailEventsOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetInboundEmailEventsOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sender** | **optional.String**| Email address of the sender. | + **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. | + **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | + **limit** | **optional.Int64**| Number of documents returned per page | [default to 100] + **offset** | **optional.Int64**| Index of the first document on the page | [default to 0] + **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation | [default to desc] + +### Return type + +[**GetInboundEmailEvents**](GetInboundEmailEvents.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetInboundEmailEventsByUuid** +> GetInboundEmailEventsByUuid GetInboundEmailEventsByUuid(ctx, uuid) +Fetch all events history for one particular received email. + +This endpoint will show the list of all events history for one particular received email. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **uuid** | **string**| UUID to fetch events specific to recieved email | + +### Return type + +[**GetInboundEmailEventsByUuid**](GetInboundEmailEventsByUuid.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..b1050c2 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,10 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique company id | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md new file mode 100644 index 0000000..d72fe45 --- /dev/null +++ b/docs/InlineResponse201.md @@ -0,0 +1,10 @@ +# InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique deal id | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse2011.md b/docs/InlineResponse2011.md new file mode 100644 index 0000000..ae072fb --- /dev/null +++ b/docs/InlineResponse2011.md @@ -0,0 +1,10 @@ +# InlineResponse2011 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique task id | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListsApi.md b/docs/ListsApi.md index 7f806d2..3028ccb 100644 --- a/docs/ListsApi.md +++ b/docs/ListsApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.ListsApi +# \ListsApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -9,13 +9,14 @@ Method | HTTP request | Description [**DeleteList**](ListsApi.md#DeleteList) | **Delete** /contacts/lists/{listId} | Delete a list [**GetContactsFromList**](ListsApi.md#GetContactsFromList) | **Get** /contacts/lists/{listId}/contacts | Get contacts in a list [**GetFolderLists**](ListsApi.md#GetFolderLists) | **Get** /contacts/folders/{folderId}/lists | Get lists in a folder -[**GetList**](ListsApi.md#GetList) | **Get** /contacts/lists/{listId} | Get a list's details +[**GetList**](ListsApi.md#GetList) | **Get** /contacts/lists/{listId} | Get a list's details [**GetLists**](ListsApi.md#GetLists) | **Get** /contacts/lists | Get all the lists [**RemoveContactFromList**](ListsApi.md#RemoveContactFromList) | **Post** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list [**UpdateList**](ListsApi.md#UpdateList) | **Put** /contacts/lists/{listId} | Update a list + # **AddContactToList** -> PostContactInfo AddContactToList(ctx, body, listId) +> PostContactInfo AddContactToList(ctx, listId, contactEmails) Add existing contacts to a list ### Required Parameters @@ -23,8 +24,8 @@ Add existing contacts to a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**AddContactToList**](AddContactToList.md)| Emails addresses OR IDs of the contacts | **listId** | **int64**| Id of the list | + **contactEmails** | [**AddContactToList**](AddContactToList.md)| Emails addresses OR IDs of the contacts | ### Return type @@ -42,7 +43,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateList** -> CreateModel CreateList(ctx, body) +> CreateModel CreateList(ctx, createList) Create a list ### Required Parameters @@ -50,7 +51,7 @@ Create a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateList**](CreateList.md)| Values to create a list | + **createList** | [**CreateList**](CreateList.md)| Values to create a list | ### Return type @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -103,10 +104,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **listId** | **int64**| Id of the list | - **optional** | ***ListsApiGetContactsFromListOpts** | optional parameters | nil if no parameters + **optional** | ***GetContactsFromListOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ListsApiGetContactsFromListOpts struct +Optional parameters are passed through a pointer to a GetContactsFromListOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -125,7 +127,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -140,10 +142,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **folderId** | **int64**| Id of the folder | - **optional** | ***ListsApiGetFolderListsOpts** | optional parameters | nil if no parameters + **optional** | ***GetFolderListsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ListsApiGetFolderListsOpts struct +Optional parameters are passed through a pointer to a GetFolderListsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -161,7 +164,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -187,7 +190,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -201,10 +204,11 @@ Get all the lists Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ListsApiGetListsOpts** | optional parameters | nil if no parameters + **optional** | ***GetListsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ListsApiGetListsOpts struct +Optional parameters are passed through a pointer to a GetListsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number of documents per page | [default to 10] @@ -221,13 +225,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RemoveContactFromList** -> PostContactInfo RemoveContactFromList(ctx, body, listId) +> PostContactInfo RemoveContactFromList(ctx, listId, contactEmails) Delete a contact from a list ### Required Parameters @@ -235,8 +239,8 @@ Delete a contact from a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | **listId** | **int64**| Id of the list | + **contactEmails** | [**RemoveContactFromList**](RemoveContactFromList.md)| Emails addresses OR IDs of the contacts | ### Return type @@ -254,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateList** -> UpdateList(ctx, body, listId) +> UpdateList(ctx, listId, updateList) Update a list ### Required Parameters @@ -262,8 +266,8 @@ Update a list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateList**](UpdateList.md)| Values to update a list | **listId** | **int64**| Id of the list | + **updateList** | [**UpdateList**](UpdateList.md)| Values to update a list | ### Return type diff --git a/docs/ManageIp.md b/docs/ManageIp.md index b2bca71..c50e8d2 100644 --- a/docs/ManageIp.md +++ b/docs/ManageIp.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/MasterAccountApi.md b/docs/MasterAccountApi.md new file mode 100644 index 0000000..31a7345 --- /dev/null +++ b/docs/MasterAccountApi.md @@ -0,0 +1,207 @@ +# \MasterAccountApi + +All URIs are relative to *https://api.sendinblue.com/v3* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CorporateMasterAccountGet**](MasterAccountApi.md#CorporateMasterAccountGet) | **Get** /corporate/masterAccount | Get the details of requested master account +[**CorporateSubAccountGet**](MasterAccountApi.md#CorporateSubAccountGet) | **Get** /corporate/subAccount | Get the list of all the sub-accounts of the master account. +[**CorporateSubAccountIdDelete**](MasterAccountApi.md#CorporateSubAccountIdDelete) | **Delete** /corporate/subAccount/{id} | Delete a sub-account +[**CorporateSubAccountIdGet**](MasterAccountApi.md#CorporateSubAccountIdGet) | **Get** /corporate/subAccount/{id} | Get sub-account details +[**CorporateSubAccountIdPlanPut**](MasterAccountApi.md#CorporateSubAccountIdPlanPut) | **Put** /corporate/subAccount/{id}/plan | Update sub-account plan +[**CorporateSubAccountPost**](MasterAccountApi.md#CorporateSubAccountPost) | **Post** /corporate/subAccount | Create a new sub-account under a master account. +[**CorporateSubAccountSsoTokenPost**](MasterAccountApi.md#CorporateSubAccountSsoTokenPost) | **Post** /corporate/subAccount/ssoToken | Generate SSO token to access Sendinblue + + +# **CorporateMasterAccountGet** +> MasterDetailsResponse CorporateMasterAccountGet(ctx, ) +Get the details of requested master account + +This endpoint will provide the details of the master account. + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**MasterDetailsResponse**](MasterDetailsResponse.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CorporateSubAccountGet** +> SubAccountsResponse CorporateSubAccountGet(ctx, offset, limit) +Get the list of all the sub-accounts of the master account. + +This endpoint will provide the list all the sub-accounts of the master account. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **offset** | **int32**| Index of the first sub-account in the page | + **limit** | **int32**| Number of sub-accounts to be displayed on each page | + +### Return type + +[**SubAccountsResponse**](SubAccountsResponse.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CorporateSubAccountIdDelete** +> CorporateSubAccountIdDelete(ctx, id) +Delete a sub-account + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **int64**| Id of the sub-account organization to be deleted | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CorporateSubAccountIdGet** +> SubAccountDetailsResponse CorporateSubAccountIdGet(ctx, id) +Get sub-account details + +This endpoint will provide the details for the specified sub-account company + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **int64**| Id of the sub-account organization | + +### Return type + +[**SubAccountDetailsResponse**](SubAccountDetailsResponse.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CorporateSubAccountIdPlanPut** +> CorporateSubAccountIdPlanPut(ctx, id, updatePlanDetails) +Update sub-account plan + +This endpoint will update the sub-account plan + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **id** | **int64**| Id of the sub-account organization | + **updatePlanDetails** | [**SubAccountUpdatePlanRequest**](SubAccountUpdatePlanRequest.md)| Values to update a sub-account plan | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CorporateSubAccountPost** +> CreateSubAccountResponse CorporateSubAccountPost(ctx, subAccountCreate) +Create a new sub-account under a master account. + +This endpoint will create a new sub-account under a master account + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **subAccountCreate** | [**CreateSubAccount**](CreateSubAccount.md)| values to create new sub-account | + +### Return type + +[**CreateSubAccountResponse**](CreateSubAccountResponse.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CorporateSubAccountSsoTokenPost** +> GetSsoToken CorporateSubAccountSsoTokenPost(ctx, ssoTokenRequest) +Generate SSO token to access Sendinblue + +This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **ssoTokenRequest** | [**SsoTokenRequest**](SsoTokenRequest.md)| Values to generate SSO token for sub-account | + +### Return type + +[**GetSsoToken**](GetSsoToken.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/MasterDetailsResponse.md b/docs/MasterDetailsResponse.md new file mode 100644 index 0000000..017077e --- /dev/null +++ b/docs/MasterDetailsResponse.md @@ -0,0 +1,16 @@ +# MasterDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email id of master account | [optional] [default to null] +**CompanyName** | **string** | Company name of master account organization | [optional] [default to null] +**Id** | **int64** | Unique identifier of the master account organization | [optional] [default to null] +**CurrencyCode** | **string** | Currency code of the master account organization | [optional] [default to null] +**Timezone** | **string** | Timezone of the master account organization | [optional] [default to null] +**BillingInfo** | [***MasterDetailsResponseBillingInfo**](MasterDetailsResponseBillingInfo.md) | | [optional] [default to null] +**PlanInfo** | [***MasterDetailsResponsePlanInfo**](MasterDetailsResponsePlanInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MasterDetailsResponseBillingInfo.md b/docs/MasterDetailsResponseBillingInfo.md new file mode 100644 index 0000000..5f03dae --- /dev/null +++ b/docs/MasterDetailsResponseBillingInfo.md @@ -0,0 +1,13 @@ +# MasterDetailsResponseBillingInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Billing email id of master account | [optional] [default to null] +**CompanyName** | **string** | Company name of master account | [optional] [default to null] +**Name** | [***MasterDetailsResponseBillingInfoName**](MasterDetailsResponseBillingInfoName.md) | | [optional] [default to null] +**Address** | [***MasterDetailsResponseBillingInfoAddress**](MasterDetailsResponseBillingInfoAddress.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MasterDetailsResponseBillingInfoAddress.md b/docs/MasterDetailsResponseBillingInfoAddress.md new file mode 100644 index 0000000..1229eb2 --- /dev/null +++ b/docs/MasterDetailsResponseBillingInfoAddress.md @@ -0,0 +1,14 @@ +# MasterDetailsResponseBillingInfoAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StreetAddress** | **string** | Street address | [optional] [default to null] +**Locality** | **string** | Locality | [optional] [default to null] +**PostalCode** | **string** | Postal code | [optional] [default to null] +**StateCode** | **string** | State code | [optional] [default to null] +**CountryCode** | **string** | Country code | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MasterDetailsResponseBillingInfoName.md b/docs/MasterDetailsResponseBillingInfoName.md new file mode 100644 index 0000000..70c8c2f --- /dev/null +++ b/docs/MasterDetailsResponseBillingInfoName.md @@ -0,0 +1,11 @@ +# MasterDetailsResponseBillingInfoName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GivenName** | **string** | First name for billing | [optional] [default to null] +**FamilyName** | **string** | Last name for billing | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MasterDetailsResponsePlanInfo.md b/docs/MasterDetailsResponsePlanInfo.md new file mode 100644 index 0000000..7ad147a --- /dev/null +++ b/docs/MasterDetailsResponsePlanInfo.md @@ -0,0 +1,15 @@ +# MasterDetailsResponsePlanInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CurrencyCode** | **string** | Plan currency | [optional] [default to null] +**NextBillingAt** | **int64** | Timestamp of next billing date | [optional] [default to null] +**Price** | **float32** | Plan amount | [optional] [default to null] +**PlanPeriod** | **string** | Plan period type | [optional] [default to null] +**SubAccounts** | **int32** | Number of sub-accounts | [optional] [default to null] +**Features** | [**[]MasterDetailsResponsePlanInfoFeatures**](MasterDetailsResponsePlanInfoFeatures.md) | List of provided features in the plan | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MasterDetailsResponsePlanInfoFeatures.md b/docs/MasterDetailsResponsePlanInfoFeatures.md new file mode 100644 index 0000000..573c01c --- /dev/null +++ b/docs/MasterDetailsResponsePlanInfoFeatures.md @@ -0,0 +1,14 @@ +# MasterDetailsResponsePlanInfoFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the feature | [optional] [default to null] +**UnitValue** | **string** | Unit value of the feature | [optional] [default to null] +**Quantity** | **int64** | Quantity provided in the plan | [optional] [default to null] +**Used** | **int64** | Quantity consumed by master | [optional] [default to null] +**Remaining** | **int64** | Quantity remaining in the plan | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Note.md b/docs/Note.md new file mode 100644 index 0000000..7719b19 --- /dev/null +++ b/docs/Note.md @@ -0,0 +1,16 @@ +# Note + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique note Id | [optional] [default to null] +**Text** | **string** | Text content of a note | [default to null] +**ContactIds** | **[]int32** | Contact ids linked to a note | [optional] [default to null] +**DealIds** | **[]string** | Deal ids linked to a note | [optional] [default to null] +**AuthorId** | [**map[string]interface{}**](interface{}.md) | Account details of user which created the note | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | Note created date/time | [optional] [default to null] +**UpdatedAt** | [**time.Time**](time.Time.md) | Note updated date/time | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NoteData.md b/docs/NoteData.md new file mode 100644 index 0000000..7480f49 --- /dev/null +++ b/docs/NoteData.md @@ -0,0 +1,12 @@ +# NoteData + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | Text content of a note | [default to null] +**ContactIds** | **[]int32** | Contact Ids linked to a note | [optional] [default to null] +**DealIds** | **[]string** | Deal Ids linked to a note | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NoteId.md b/docs/NoteId.md new file mode 100644 index 0000000..77195a5 --- /dev/null +++ b/docs/NoteId.md @@ -0,0 +1,10 @@ +# NoteId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique note Id | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NoteList.md b/docs/NoteList.md new file mode 100644 index 0000000..0d98d3e --- /dev/null +++ b/docs/NoteList.md @@ -0,0 +1,9 @@ +# NoteList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Pipeline.md b/docs/Pipeline.md new file mode 100644 index 0000000..bd36f8d --- /dev/null +++ b/docs/Pipeline.md @@ -0,0 +1,10 @@ +# Pipeline + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Stages** | [**[]PipelineStage**](PipelineStage.md) | List of stages | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PipelineStage.md b/docs/PipelineStage.md new file mode 100644 index 0000000..17bc305 --- /dev/null +++ b/docs/PipelineStage.md @@ -0,0 +1,11 @@ +# PipelineStage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Stage id | [optional] [default to null] +**Name** | **string** | Stage name | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostContactInfo.md b/docs/PostContactInfo.md index b2193bc..eeb5d46 100644 --- a/docs/PostContactInfo.md +++ b/docs/PostContactInfo.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostContactInfoContacts.md b/docs/PostContactInfoContacts.md index c275f2e..fca06c6 100644 --- a/docs/PostContactInfoContacts.md +++ b/docs/PostContactInfoContacts.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostSendFailed.md b/docs/PostSendFailed.md index 648ff83..1551b1e 100644 --- a/docs/PostSendFailed.md +++ b/docs/PostSendFailed.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PostSendSmsTestFailed.md b/docs/PostSendSmsTestFailed.md index ca39372..645c76d 100644 --- a/docs/PostSendSmsTestFailed.md +++ b/docs/PostSendSmsTestFailed.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ProcessApi.md b/docs/ProcessApi.md index 75952b3..0936b1b 100644 --- a/docs/ProcessApi.md +++ b/docs/ProcessApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.ProcessApi +# \ProcessApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -7,6 +7,7 @@ Method | HTTP request | Description [**GetProcess**](ProcessApi.md#GetProcess) | **Get** /processes/{processId} | Return the informations for a process [**GetProcesses**](ProcessApi.md#GetProcesses) | **Get** /processes | Return all the processes for your account + # **GetProcess** > GetProcess GetProcess(ctx, processId) Return the informations for a process @@ -28,7 +29,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -42,10 +43,11 @@ Return all the processes for your account Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ProcessApiGetProcessesOpts** | optional parameters | nil if no parameters + **optional** | ***GetProcessesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ProcessApiGetProcessesOpts struct +Optional parameters are passed through a pointer to a GetProcessesOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number limitation for the result returned | [default to 10] @@ -62,7 +64,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/RemainingCreditModel.md b/docs/RemainingCreditModel.md index 5ee130c..438ba7f 100644 --- a/docs/RemainingCreditModel.md +++ b/docs/RemainingCreditModel.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemainingCreditModelChild.md b/docs/RemainingCreditModelChild.md index b581798..14f0961 100644 --- a/docs/RemainingCreditModelChild.md +++ b/docs/RemainingCreditModelChild.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemainingCreditModelReseller.md b/docs/RemainingCreditModelReseller.md index bb177a5..c8f44a8 100644 --- a/docs/RemainingCreditModelReseller.md +++ b/docs/RemainingCreditModelReseller.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemoveContactFromList.md b/docs/RemoveContactFromList.md index 6bc7754..02aba97 100644 --- a/docs/RemoveContactFromList.md +++ b/docs/RemoveContactFromList.md @@ -3,9 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Emails** | **[]string** | Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. | [optional] [default to null] +**Emails** | **[]string** | Required if 'all' is false. Emails to remove from a list. You can pass a maximum of 150 emails for removal in one request. | [optional] [default to null] **Ids** | **[]int64** | Mandatory if Emails are not passed, ignored otherwise. Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. | [optional] [default to null] -**All** | **bool** | Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress | [optional] [default to null] +**All** | **bool** | Required if none of 'emails' or 'ids' are passed. Remove all existing contacts from a list. A process will be created in this scenario. You can fetch the process details to know about the progress | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RemoveCredits.md b/docs/RemoveCredits.md index de2c907..12da80f 100644 --- a/docs/RemoveCredits.md +++ b/docs/RemoveCredits.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactExport.md b/docs/RequestContactExport.md index 968dc63..715e42a 100644 --- a/docs/RequestContactExport.md +++ b/docs/RequestContactExport.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExportAttributes** | **[]string** | List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. | [optional] [default to null] -**ContactFilter** | [***interface{}**](interface{}.md) | This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {\"blacklisted\":true} will export all the blacklisted contacts. | [optional] [default to null] -**CustomContactFilter** | [***RequestContactExportCustomContactFilter**](RequestContactExportCustomContactFilter.md) | | [optional] [default to null] +**ExportAttributes** | **[]string** | List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. | [optional] [default to null] +**CustomContactFilter** | [***RequestContactExportCustomContactFilter**](RequestContactExportCustomContactFilter.md) | | [default to null] **NotifyUrl** | **string** | Webhook that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactExportCustomContactFilter.md b/docs/RequestContactExportCustomContactFilter.md index 8a28c2e..13d6b9a 100644 --- a/docs/RequestContactExportCustomContactFilter.md +++ b/docs/RequestContactExportCustomContactFilter.md @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactImport.md b/docs/RequestContactImport.md index 97f50cd..cd79994 100644 --- a/docs/RequestContactImport.md +++ b/docs/RequestContactImport.md @@ -3,15 +3,17 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FileUrl** | **string** | Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv | [optional] [default to null] -**FileBody** | **string** | Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional] [default to null] +**FileUrl** | **string** | Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json | [optional] [default to null] +**FileBody** | **string** | Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. | [optional] [default to null] +**JsonBody** | [**[]map[string]interface{}**](map.md) | **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. | [optional] [default to null] **ListIds** | **[]int64** | Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. | [optional] [default to null] **NotifyUrl** | **string** | URL that will be called once the import process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 | [optional] [default to null] **NewList** | [***RequestContactImportNewList**](RequestContactImportNewList.md) | | [optional] [default to null] -**EmailBlacklist** | **bool** | To blacklist all the contacts for email | [optional] [default to false] -**SmsBlacklist** | **bool** | To blacklist all the contacts for sms | [optional] [default to false] -**UpdateExistingContacts** | **bool** | To facilitate the choice to update the existing contacts | [optional] [default to true] -**EmptyContactsAttributes** | **bool** | To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) | [optional] [default to false] +**EmailBlacklist** | **bool** | To blacklist all the contacts for email | [optional] [default to null] +**SmsBlacklist** | **bool** | To blacklist all the contacts for sms | [optional] [default to null] +**UpdateExistingContacts** | **bool** | To facilitate the choice to update the existing contacts | [optional] [default to null] +**EmptyContactsAttributes** | **bool** | To facilitate the choice to erase any attribute of the existing contacts with empty value. emptyContactsAttributes = true means the empty fields in your import will erase any attribute that currently contain data in SendinBlue, & emptyContactsAttributes = false means the empty fields will not affect your existing data ( only available if `updateExistingContacts` set to true ) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestContactImportNewList.md b/docs/RequestContactImportNewList.md index 06b90bc..83422d4 100644 --- a/docs/RequestContactImportNewList.md +++ b/docs/RequestContactImportNewList.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/RequestSmsRecipientExport.md b/docs/RequestSmsRecipientExport.md index a69d77d..eed8fed 100644 --- a/docs/RequestSmsRecipientExport.md +++ b/docs/RequestSmsRecipientExport.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ResellerApi.md b/docs/ResellerApi.md index 65ec301..a9b24cf 100644 --- a/docs/ResellerApi.md +++ b/docs/ResellerApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.ResellerApi +# \ResellerApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -11,18 +11,19 @@ Method | HTTP request | Description [**DeleteChildDomain**](ResellerApi.md#DeleteChildDomain) | **Delete** /reseller/children/{childIdentifier}/domains/{domainName} | Delete the sender domain of the reseller child based on the childIdentifier and domainName passed [**DeleteResellerChild**](ResellerApi.md#DeleteResellerChild) | **Delete** /reseller/children/{childIdentifier} | Delete a single reseller child based on the child identifier supplied [**DissociateIpFromChild**](ResellerApi.md#DissociateIpFromChild) | **Post** /reseller/children/{childIdentifier}/ips/dissociate | Dissociate a dedicated IP to the child -[**GetChildAccountCreationStatus**](ResellerApi.md#GetChildAccountCreationStatus) | **Get** /reseller/children/{childIdentifier}/accountCreationStatus | Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied +[**GetChildAccountCreationStatus**](ResellerApi.md#GetChildAccountCreationStatus) | **Get** /reseller/children/{childIdentifier}/accountCreationStatus | Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied [**GetChildDomains**](ResellerApi.md#GetChildDomains) | **Get** /reseller/children/{childIdentifier}/domains | Get all sender domains for a specific child account -[**GetChildInfo**](ResellerApi.md#GetChildInfo) | **Get** /reseller/children/{childIdentifier} | Get a child account's details +[**GetChildInfo**](ResellerApi.md#GetChildInfo) | **Get** /reseller/children/{childIdentifier} | Get a child account's details [**GetResellerChilds**](ResellerApi.md#GetResellerChilds) | **Get** /reseller/children | Get the list of all children accounts [**GetSsoToken**](ResellerApi.md#GetSsoToken) | **Get** /reseller/children/{childIdentifier}/auth | Get session token to access Sendinblue (SSO) [**RemoveCredits**](ResellerApi.md#RemoveCredits) | **Post** /reseller/children/{childIdentifier}/credits/remove | Remove Email and/or SMS credits from a specific child account -[**UpdateChildAccountStatus**](ResellerApi.md#UpdateChildAccountStatus) | **Put** /reseller/children/{childIdentifier}/accountStatus | Update info of reseller's child account status based on the childIdentifier supplied -[**UpdateChildDomain**](ResellerApi.md#UpdateChildDomain) | **Put** /reseller/children/{childIdentifier}/domains/{domainName} | Update the sender domain of reseller's child based on the childIdentifier and domainName passed -[**UpdateResellerChild**](ResellerApi.md#UpdateResellerChild) | **Put** /reseller/children/{childIdentifier} | Update info of reseller's child based on the child identifier supplied +[**UpdateChildAccountStatus**](ResellerApi.md#UpdateChildAccountStatus) | **Put** /reseller/children/{childIdentifier}/accountStatus | Update info of reseller's child account status based on the childIdentifier supplied +[**UpdateChildDomain**](ResellerApi.md#UpdateChildDomain) | **Put** /reseller/children/{childIdentifier}/domains/{domainName} | Update the sender domain of reseller's child based on the childIdentifier and domainName passed +[**UpdateResellerChild**](ResellerApi.md#UpdateResellerChild) | **Put** /reseller/children/{childIdentifier} | Update info of reseller's child based on the child identifier supplied + # **AddCredits** -> RemainingCreditModel AddCredits(ctx, body, childIdentifier) +> RemainingCreditModel AddCredits(ctx, childIdentifier, addCredits) Add Email and/or SMS credits to a specific child account ### Required Parameters @@ -30,8 +31,8 @@ Add Email and/or SMS credits to a specific child account Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**AddCredits**](AddCredits.md)| Values to post to add credit to a specific child account | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **addCredits** | [**AddCredits**](AddCredits.md)| Values to post to add credit to a specific child account | ### Return type @@ -49,7 +50,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **AssociateIpToChild** -> AssociateIpToChild(ctx, body, childIdentifier) +> AssociateIpToChild(ctx, childIdentifier, ip) Associate a dedicated IP to the child ### Required Parameters @@ -57,8 +58,8 @@ Associate a dedicated IP to the child Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**ManageIp**](ManageIp.md)| IP to associate | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to associate | ### Return type @@ -76,7 +77,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateChildDomain** -> CreateChildDomain(ctx, body, childIdentifier) +> CreateChildDomain(ctx, childIdentifier, addChildDomain) Create a domain for a child account ### Required Parameters @@ -84,8 +85,8 @@ Create a domain for a child account Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**AddChildDomain**](AddChildDomain.md)| Sender domain to add for a specific child account. This will not be displayed to the parent account. | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **addChildDomain** | [**AddChildDomain**](AddChildDomain.md)| Sender domain to add for a specific child account. This will not be displayed to the parent account. | ### Return type @@ -111,13 +112,14 @@ Creates a reseller child Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ResellerApiCreateResellerChildOpts** | optional parameters | nil if no parameters + **optional** | ***CreateResellerChildOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ResellerApiCreateResellerChildOpts struct +Optional parameters are passed through a pointer to a CreateResellerChildOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of CreateChild**](CreateChild.md)| reseller child to add | + **resellerChild** | [**optional.Interface of CreateChild**](CreateChild.md)| reseller child to add | ### Return type @@ -143,7 +145,7 @@ Delete the sender domain of the reseller child based on the childIdentifier and Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | **domainName** | **string**| Pass the existing domain that needs to be deleted | ### Return type @@ -156,7 +158,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -170,7 +172,7 @@ Delete a single reseller child based on the child identifier supplied Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **childIdentifier** | **string**| Either auth key or child id of reseller's child | + **childIdentifier** | **string**| Either auth key or child id of reseller's child | ### Return type @@ -182,13 +184,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **DissociateIpFromChild** -> DissociateIpFromChild(ctx, body, childIdentifier) +> DissociateIpFromChild(ctx, childIdentifier, ip) Dissociate a dedicated IP to the child ### Required Parameters @@ -196,8 +198,8 @@ Dissociate a dedicated IP to the child Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**ManageIp**](ManageIp.md)| IP to dissociate | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **ip** | [**ManageIp**](ManageIp.md)| IP to dissociate | ### Return type @@ -223,7 +225,7 @@ Get the status of a reseller's child account creation, whether it is successfull Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | ### Return type @@ -235,13 +237,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetChildDomains** -> []AllOfgetChildDomainsItems GetChildDomains(ctx, childIdentifier) +> GetChildDomains GetChildDomains(ctx, childIdentifier) Get all sender domains for a specific child account ### Required Parameters @@ -249,11 +251,11 @@ Get all sender domains for a specific child account Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | ### Return type -[**[]AllOfgetChildDomainsItems**](array.md) +[**GetChildDomains**](GetChildDomains.md) ### Authorization @@ -261,7 +263,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -275,11 +277,11 @@ Get a child account's details Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | ### Return type -[**GetChildInfo**](getChildInfo.md) +[**GetChildInfo**](GetChildInfo.md) ### Authorization @@ -287,7 +289,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -301,10 +303,11 @@ Get the list of all children accounts Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***ResellerApiGetResellerChildsOpts** | optional parameters | nil if no parameters + **optional** | ***GetResellerChildsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a ResellerApiGetResellerChildsOpts struct +Optional parameters are passed through a pointer to a GetResellerChildsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number of documents for child accounts information per page | [default to 10] @@ -320,7 +323,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -336,7 +339,7 @@ It returns a session [token] which will remain valid for a short period of time. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | ### Return type @@ -348,13 +351,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **RemoveCredits** -> RemainingCreditModel RemoveCredits(ctx, body, childIdentifier) +> RemainingCreditModel RemoveCredits(ctx, childIdentifier, removeCredits) Remove Email and/or SMS credits from a specific child account ### Required Parameters @@ -362,8 +365,8 @@ Remove Email and/or SMS credits from a specific child account Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**RemoveCredits**](RemoveCredits.md)| Values to post to remove email or SMS credits from a specific child account | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **removeCredits** | [**RemoveCredits**](RemoveCredits.md)| Values to post to remove email or SMS credits from a specific child account | ### Return type @@ -381,7 +384,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateChildAccountStatus** -> UpdateChildAccountStatus(ctx, body, childIdentifier) +> UpdateChildAccountStatus(ctx, childIdentifier, updateChildAccountStatus) Update info of reseller's child account status based on the childIdentifier supplied ### Required Parameters @@ -389,8 +392,8 @@ Update info of reseller's child account status based on the childIdentifier supp Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateChildAccountStatus**](UpdateChildAccountStatus.md)| values to update in child account status | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **updateChildAccountStatus** | [**UpdateChildAccountStatus**](UpdateChildAccountStatus.md)| values to update in child account status | ### Return type @@ -408,7 +411,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateChildDomain** -> UpdateChildDomain(ctx, body, childIdentifier, domainName) +> UpdateChildDomain(ctx, childIdentifier, domainName, updateChildDomain) Update the sender domain of reseller's child based on the childIdentifier and domainName passed ### Required Parameters @@ -416,9 +419,9 @@ Update the sender domain of reseller's child based on the childIdentifier and do Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateChildDomain**](UpdateChildDomain.md)| value to update for sender domain | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | **domainName** | **string**| Pass the existing domain that needs to be updated | + **updateChildDomain** | [**UpdateChildDomain**](UpdateChildDomain.md)| value to update for sender domain | ### Return type @@ -436,7 +439,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateResellerChild** -> UpdateResellerChild(ctx, body, childIdentifier) +> UpdateResellerChild(ctx, childIdentifier, resellerChild) Update info of reseller's child based on the child identifier supplied ### Required Parameters @@ -444,8 +447,8 @@ Update info of reseller's child based on the child identifier supplied Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateChild**](UpdateChild.md)| values to update in child profile | - **childIdentifier** | **string**| Either auth key or id of reseller's child | + **childIdentifier** | **string**| Either auth key or id of reseller's child | + **resellerChild** | [**UpdateChild**](UpdateChild.md)| values to update in child profile | ### Return type diff --git a/docs/SMSCampaignsApi.md b/docs/SMSCampaignsApi.md index d46d3c9..06e9e74 100644 --- a/docs/SMSCampaignsApi.md +++ b/docs/SMSCampaignsApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.SMSCampaignsApi +# \SMSCampaignsApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -8,15 +8,16 @@ Method | HTTP request | Description [**DeleteSmsCampaign**](SMSCampaignsApi.md#DeleteSmsCampaign) | **Delete** /smsCampaigns/{campaignId} | Delete an SMS campaign [**GetSmsCampaign**](SMSCampaignsApi.md#GetSmsCampaign) | **Get** /smsCampaigns/{campaignId} | Get an SMS campaign [**GetSmsCampaigns**](SMSCampaignsApi.md#GetSmsCampaigns) | **Get** /smsCampaigns | Returns the information for all your created SMS campaigns -[**RequestSmsRecipientExport**](SMSCampaignsApi.md#RequestSmsRecipientExport) | **Post** /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients +[**RequestSmsRecipientExport**](SMSCampaignsApi.md#RequestSmsRecipientExport) | **Post** /smsCampaigns/{campaignId}/exportRecipients | Export an SMS campaign's recipients [**SendSmsCampaignNow**](SMSCampaignsApi.md#SendSmsCampaignNow) | **Post** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately -[**SendSmsReport**](SMSCampaignsApi.md#SendSmsReport) | **Post** /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report +[**SendSmsReport**](SMSCampaignsApi.md#SendSmsReport) | **Post** /smsCampaigns/{campaignId}/sendReport | Send an SMS campaign's report [**SendTestSms**](SMSCampaignsApi.md#SendTestSms) | **Post** /smsCampaigns/{campaignId}/sendTest | Send a test SMS campaign [**UpdateSmsCampaign**](SMSCampaignsApi.md#UpdateSmsCampaign) | **Put** /smsCampaigns/{campaignId} | Update an SMS campaign -[**UpdateSmsCampaignStatus**](SMSCampaignsApi.md#UpdateSmsCampaignStatus) | **Put** /smsCampaigns/{campaignId}/status | Update a campaign's status +[**UpdateSmsCampaignStatus**](SMSCampaignsApi.md#UpdateSmsCampaignStatus) | **Put** /smsCampaigns/{campaignId}/status | Update a campaign's status + # **CreateSmsCampaign** -> CreateModel CreateSmsCampaign(ctx, body) +> CreateModel CreateSmsCampaign(ctx, createSmsCampaign) Creates an SMS campaign ### Required Parameters @@ -24,7 +25,7 @@ Creates an SMS campaign Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateSmsCampaign**](CreateSmsCampaign.md)| Values to create an SMS Campaign | + **createSmsCampaign** | [**CreateSmsCampaign**](CreateSmsCampaign.md)| Values to create an SMS Campaign | ### Return type @@ -62,7 +63,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -88,7 +89,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -102,15 +103,16 @@ Returns the information for all your created SMS campaigns Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***SMSCampaignsApiGetSmsCampaignsOpts** | optional parameters | nil if no parameters + **optional** | ***GetSmsCampaignsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a SMSCampaignsApiGetSmsCampaignsOpts struct +Optional parameters are passed through a pointer to a GetSmsCampaignsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **status** | **optional.String**| Status of campaign. | - **startDate** | **optional.String**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | - **endDate** | **optional.String**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | + **startDate** | **optional.String**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | + **endDate** | **optional.String**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | **limit** | **optional.Int64**| Number limitation for the result returned | [default to 500] **offset** | **optional.Int64**| Beginning point in the list to retrieve from. | [default to 0] **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] @@ -125,7 +127,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -142,14 +144,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **campaignId** | **int64**| id of the campaign | - **optional** | ***SMSCampaignsApiRequestSmsRecipientExportOpts** | optional parameters | nil if no parameters + **optional** | ***RequestSmsRecipientExportOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a SMSCampaignsApiRequestSmsRecipientExportOpts struct +Optional parameters are passed through a pointer to a RequestSmsRecipientExportOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of RequestSmsRecipientExport**](RequestSmsRecipientExport.md)| Values to send for a recipient export request | + **recipientExport** | [**optional.Interface of RequestSmsRecipientExport**](RequestSmsRecipientExport.md)| Values to send for a recipient export request | ### Return type @@ -187,13 +190,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendSmsReport** -> SendSmsReport(ctx, body, campaignId) +> SendSmsReport(ctx, campaignId, sendReport) Send an SMS campaign's report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. @@ -203,8 +206,8 @@ Send report of Sent and Archived campaign, to the specified email addresses, wit Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendReport**](SendReport.md)| Values for send a report | **campaignId** | **int64**| id of the campaign | + **sendReport** | [**SendReport**](SendReport.md)| Values for send a report | ### Return type @@ -222,7 +225,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendTestSms** -> SendTestSms(ctx, body, campaignId) +> SendTestSms(ctx, campaignId, phoneNumber) Send a test SMS campaign ### Required Parameters @@ -230,8 +233,8 @@ Send a test SMS campaign Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendTestSms**](SendTestSms.md)| Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted | **campaignId** | **int64**| Id of the SMS campaign | + **phoneNumber** | [**SendTestSms**](SendTestSms.md)| Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted | ### Return type @@ -249,7 +252,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateSmsCampaign** -> UpdateSmsCampaign(ctx, body, campaignId) +> UpdateSmsCampaign(ctx, campaignId, updateSmsCampaign) Update an SMS campaign ### Required Parameters @@ -257,8 +260,8 @@ Update an SMS campaign Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateSmsCampaign**](UpdateSmsCampaign.md)| Values to update an SMS Campaign | **campaignId** | **int64**| id of the SMS campaign | + **updateSmsCampaign** | [**UpdateSmsCampaign**](UpdateSmsCampaign.md)| Values to update an SMS Campaign | ### Return type @@ -276,7 +279,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateSmsCampaignStatus** -> UpdateSmsCampaignStatus(ctx, body, campaignId) +> UpdateSmsCampaignStatus(ctx, campaignId, status) Update a campaign's status ### Required Parameters @@ -284,8 +287,8 @@ Update a campaign's status Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign. | **campaignId** | **int64**| id of the campaign | + **status** | [**UpdateCampaignStatus**](UpdateCampaignStatus.md)| Status of the campaign. | ### Return type diff --git a/docs/ScheduleSmtpEmail.md b/docs/ScheduleSmtpEmail.md new file mode 100644 index 0000000..605f55f --- /dev/null +++ b/docs/ScheduleSmtpEmail.md @@ -0,0 +1,12 @@ +# ScheduleSmtpEmail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | Message ID of the transactional email scheduled | [optional] [default to null] +**MessageIds** | **[]string** | | [optional] [default to null] +**BatchId** | **string** | Batch ID of the batch transactional email scheduled | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SendEmail.md b/docs/SendEmail.md deleted file mode 100644 index faf22c4..0000000 --- a/docs/SendEmail.md +++ /dev/null @@ -1,17 +0,0 @@ -# SendEmail - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailTo** | **[]string** | List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. | [default to null] -**EmailBcc** | **[]string** | List of the email addresses of the recipients in bcc | [optional] [default to null] -**EmailCc** | **[]string** | List of the email addresses of the recipients in cc | [optional] [default to null] -**ReplyTo** | **string** | Email address which shall be used by campaign recipients to reply back | [optional] [default to null] -**AttachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] [default to null] -**Attachment** | [**[]SendEmailAttachment**](SendEmailAttachment.md) | Pass the list of content (base64 encoded) and name of the attachment. For example, [{\"content\":\"base64 encoded content 1\", \"name\":\"attcahment1\"}, {\"content\":\"base64 encoded content 2\", \"name\":\"attcahment2\"}]. | [optional] [default to null] -**Headers** | [***interface{}**](interface{}.md) | Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, {\"Content-Type\":\"text/html\", \"charset\":\"iso-8859-1\", \"sender.ip\":\"1.2.3.4\"} | [optional] [default to null] -**Attributes** | [***interface{}**](interface{}.md) | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"} | [optional] [default to null] -**Tags** | **[]string** | Tag your emails to find them more easily | [optional] [default to null] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/SendReport.md b/docs/SendReport.md index 86a6b34..f7d0f6f 100644 --- a/docs/SendReport.md +++ b/docs/SendReport.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Language** | **string** | Language of email content for campaign report sending. | [optional] [default to LANGUAGE.FR] +**Language** | **string** | Language of email content for campaign report sending. | [optional] [default to null] **Email** | [***SendReportEmail**](SendReportEmail.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendReportEmail.md b/docs/SendReportEmail.md index a660d2a..93d4bc1 100644 --- a/docs/SendReportEmail.md +++ b/docs/SendReportEmail.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSms.md b/docs/SendSms.md index 6808486..38adb1c 100644 --- a/docs/SendSms.md +++ b/docs/SendSms.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Reference** | **string** | | [default to null] **MessageId** | **int64** | | [default to null] -**SmsCount** | **int64** | Count of SMS's to send multiple text messages | [optional] [default to null] +**SmsCount** | **int64** | Count of SMS's to send multiple text messages | [optional] [default to null] **UsedCredits** | **float32** | SMS credits used per text message | [optional] [default to null] **RemainingCredits** | **float32** | Remaining SMS credits of the user | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmail.md b/docs/SendSmtpEmail.md index db72cf9..19e724a 100644 --- a/docs/SendSmtpEmail.md +++ b/docs/SendSmtpEmail.md @@ -7,16 +7,19 @@ Name | Type | Description | Notes **To** | [**[]SendSmtpEmailTo**](SendSmtpEmailTo.md) | Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] | [optional] [default to null] **Bcc** | [**[]SendSmtpEmailBcc**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] **Cc** | [**[]SendSmtpEmailCc**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] -**HtmlContent** | **string** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] [default to null] -**TextContent** | **string** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] [default to null] -**Subject** | **string** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] [default to null] +**HtmlContent** | **string** | HTML body of the message ( Mandatory if 'templateId' is not passed, ignored if 'templateId' is passed ) | [optional] [default to null] +**TextContent** | **string** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] [default to null] +**Subject** | **string** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] [default to null] **ReplyTo** | [***SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] [default to null] -**Attachment** | [**[]SendSmtpEmailAttachment**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] [default to null] -**Headers** | [***interface{}**](interface{}.md) | Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\"}`. | [optional] [default to null] -**TemplateId** | **int64** | Id of the template. Mandatory if messageVersions are passed | [optional] [default to null] -**Params** | [***interface{}**](interface{}.md) | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] [default to null] -**MessageVersions** | [**[]SendSmtpEmailMessageVersions**](SendSmtpEmailMessageVersions.md) | You can customize and send out multiple versions of a templateId. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. This feature is currently in its beta version. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails | [optional] [default to null] +**Attachment** | [**[]SendSmtpEmailAttachment**](SendSmtpEmailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) | [optional] [default to null] +**Headers** | [**map[string]interface{}**](interface{}.md) | Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. | [optional] [default to null] +**TemplateId** | **int64** | Id of the template. | [optional] [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] [default to null] +**MessageVersions** | [**[]SendSmtpEmailMessageVersions**](SendSmtpEmailMessageVersions.md) | You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails | [optional] [default to null] **Tags** | **[]string** | Tag your emails to find them more easily | [optional] [default to null] +**ScheduledAt** | [**time.Time**](time.Time.md) | UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. | [optional] [default to null] +**BatchId** | **string** | Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailAttachment.md b/docs/SendSmtpEmailAttachment.md index 2d1c6bf..e4a7b92 100644 --- a/docs/SendSmtpEmailAttachment.md +++ b/docs/SendSmtpEmailAttachment.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailBcc.md b/docs/SendSmtpEmailBcc.md index b7e8047..466db23 100644 --- a/docs/SendSmtpEmailBcc.md +++ b/docs/SendSmtpEmailBcc.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailCc.md b/docs/SendSmtpEmailCc.md index de5d61b..d9075a6 100644 --- a/docs/SendSmtpEmailCc.md +++ b/docs/SendSmtpEmailCc.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailMessageVersions.md b/docs/SendSmtpEmailMessageVersions.md index 0b3baf6..77fe3ac 100644 --- a/docs/SendSmtpEmailMessageVersions.md +++ b/docs/SendSmtpEmailMessageVersions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **To** | [**[]SendSmtpEmailTo1**](SendSmtpEmailTo1.md) | List of email addresses and names (_optional_) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] | [default to null] -**Params** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. | [optional] [default to null] **Bcc** | [**[]SendSmtpEmailBcc**](SendSmtpEmailBcc.md) | List of email addresses and names (optional) of the recipients in bcc | [optional] [default to null] **Cc** | [**[]SendSmtpEmailCc**](SendSmtpEmailCc.md) | List of email addresses and names (optional) of the recipients in cc | [optional] [default to null] **ReplyTo** | [***SendSmtpEmailReplyTo1**](SendSmtpEmailReplyTo1.md) | | [optional] [default to null] @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailReplyTo.md b/docs/SendSmtpEmailReplyTo.md index 0cb8e58..d344c45 100644 --- a/docs/SendSmtpEmailReplyTo.md +++ b/docs/SendSmtpEmailReplyTo.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailReplyTo1.md b/docs/SendSmtpEmailReplyTo1.md index 61f4121..f3b0420 100644 --- a/docs/SendSmtpEmailReplyTo1.md +++ b/docs/SendSmtpEmailReplyTo1.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailSender.md b/docs/SendSmtpEmailSender.md index 353d706..1785040 100644 --- a/docs/SendSmtpEmailSender.md +++ b/docs/SendSmtpEmailSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailTo.md b/docs/SendSmtpEmailTo.md index 0a03ac8..9706178 100644 --- a/docs/SendSmtpEmailTo.md +++ b/docs/SendSmtpEmailTo.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendSmtpEmailTo1.md b/docs/SendSmtpEmailTo1.md index 3dfc391..e932eeb 100644 --- a/docs/SendSmtpEmailTo1.md +++ b/docs/SendSmtpEmailTo1.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTestEmail.md b/docs/SendTestEmail.md index 03c860d..77ad8b7 100644 --- a/docs/SendTestEmail.md +++ b/docs/SendTestEmail.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EmailTo** | **[]string** | List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. | [optional] [default to null] +**EmailTo** | **[]string** | List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTestSms.md b/docs/SendTestSms.md index 5bc743f..3735587 100644 --- a/docs/SendTestSms.md +++ b/docs/SendTestSms.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendTransacSms.md b/docs/SendTransacSms.md index f78cb74..2f7d76d 100644 --- a/docs/SendTransacSms.md +++ b/docs/SendTransacSms.md @@ -6,9 +6,11 @@ Name | Type | Description | Notes **Sender** | **string** | Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** | [default to null] **Recipient** | **string** | Mobile number to send SMS with the country code | [default to null] **Content** | **string** | Content of the message. If more than 160 characters long, will be sent as multiple text messages | [default to null] -**Type_** | **string** | Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. | [optional] [default to TYPE_.TRANSACTIONAL] +**Type_** | **string** | Type of the SMS. Marketing SMS messages are those sent typically with marketing content. Transactional SMS messages are sent to individuals and are triggered in response to some action, such as a sign-up, purchase, etc. | [optional] [default to null] **Tag** | **string** | Tag of the message | [optional] [default to null] **WebUrl** | **string** | Webhook to call for each event triggered by the message (delivered etc.) | [optional] [default to null] +**UnicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SendersApi.md b/docs/SendersApi.md index 5a67be0..06debd7 100644 --- a/docs/SendersApi.md +++ b/docs/SendersApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.SendersApi +# \SendersApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -11,6 +11,7 @@ Method | HTTP request | Description [**GetSenders**](SendersApi.md#GetSenders) | **Get** /senders | Get the list of all your senders [**UpdateSender**](SendersApi.md#UpdateSender) | **Put** /senders/{senderId} | Update a sender + # **CreateSender** > CreateSenderModel CreateSender(ctx, optional) Create a new sender @@ -20,13 +21,14 @@ Create a new sender Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***SendersApiCreateSenderOpts** | optional parameters | nil if no parameters + **optional** | ***CreateSenderOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a SendersApiCreateSenderOpts struct +Optional parameters are passed through a pointer to a CreateSenderOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of CreateSender**](CreateSender.md)| sender's name | + **sender** | [**optional.Interface of CreateSender**](CreateSender.md)| sender's name | ### Return type @@ -64,7 +66,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -86,7 +88,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -112,7 +114,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -126,10 +128,11 @@ Get the list of all your senders Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***SendersApiGetSendersOpts** | optional parameters | nil if no parameters + **optional** | ***GetSendersOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a SendersApiGetSendersOpts struct +Optional parameters are passed through a pointer to a GetSendersOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ip** | **optional.String**| Filter your senders for a specific ip (available for dedicated IP usage only) | @@ -145,7 +148,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -160,14 +163,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **senderId** | **int64**| Id of the sender | - **optional** | ***SendersApiUpdateSenderOpts** | optional parameters | nil if no parameters + **optional** | ***UpdateSenderOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a SendersApiUpdateSenderOpts struct +Optional parameters are passed through a pointer to a UpdateSenderOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of UpdateSender**](UpdateSender.md)| sender's name | + **sender** | [**optional.Interface of UpdateSender**](UpdateSender.md)| sender's name | ### Return type diff --git a/docs/SsoTokenRequest.md b/docs/SsoTokenRequest.md new file mode 100644 index 0000000..acc4439 --- /dev/null +++ b/docs/SsoTokenRequest.md @@ -0,0 +1,11 @@ +# SsoTokenRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | Id of the sub-account organization | [default to null] +**Email** | **string** | User email of sub-account organization | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponse.md b/docs/SubAccountDetailsResponse.md new file mode 100644 index 0000000..c274b54 --- /dev/null +++ b/docs/SubAccountDetailsResponse.md @@ -0,0 +1,13 @@ +# SubAccountDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the sub-account user | [optional] [default to null] +**Email** | **string** | Email id of the sub-account organization | [optional] [default to null] +**CompanyName** | **string** | Sub-account company name | [optional] [default to null] +**PlanInfo** | [***SubAccountDetailsResponsePlanInfo**](SubAccountDetailsResponsePlanInfo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfo.md b/docs/SubAccountDetailsResponsePlanInfo.md new file mode 100644 index 0000000..e4d8eb1 --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfo.md @@ -0,0 +1,12 @@ +# SubAccountDetailsResponsePlanInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credits** | [***SubAccountDetailsResponsePlanInfoCredits**](SubAccountDetailsResponsePlanInfoCredits.md) | | [optional] [default to null] +**Features** | [***SubAccountDetailsResponsePlanInfoFeatures**](SubAccountDetailsResponsePlanInfoFeatures.md) | | [optional] [default to null] +**PlanType** | **string** | type of the plan | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoCredits.md b/docs/SubAccountDetailsResponsePlanInfoCredits.md new file mode 100644 index 0000000..580523b --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoCredits.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sms** | **int64** | SMS credits remaining on the sub-account | [optional] [default to null] +**Emails** | [***SubAccountDetailsResponsePlanInfoCreditsEmails**](SubAccountDetailsResponsePlanInfoCreditsEmails.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md b/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md new file mode 100644 index 0000000..af7d463 --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoCreditsEmails.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoCreditsEmails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quantity** | **int64** | Quantity of email messaging limits provided | [optional] [default to null] +**Remaining** | **int64** | Available email messaging limits for use | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoFeatures.md b/docs/SubAccountDetailsResponsePlanInfoFeatures.md new file mode 100644 index 0000000..8ecd5f1 --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoFeatures.md @@ -0,0 +1,12 @@ +# SubAccountDetailsResponsePlanInfoFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Inbox** | [***SubAccountDetailsResponsePlanInfoFeaturesInbox**](SubAccountDetailsResponsePlanInfoFeaturesInbox.md) | | [optional] [default to null] +**LandingPage** | [***SubAccountDetailsResponsePlanInfoFeaturesLandingPage**](SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md) | | [optional] [default to null] +**Users** | [***SubAccountDetailsResponsePlanInfoFeaturesUsers**](SubAccountDetailsResponsePlanInfoFeaturesUsers.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md b/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md new file mode 100644 index 0000000..91e28b6 --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoFeaturesInbox.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoFeaturesInbox + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quantity** | **int64** | Quantity of inbox provided | [optional] [default to null] +**Remaining** | **int64** | Available inboxes for use | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md b/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md new file mode 100644 index 0000000..3000c64 --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoFeaturesLandingPage.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoFeaturesLandingPage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quantity** | **int64** | Quantity of landing pages provided | [optional] [default to null] +**Remaining** | **int64** | Available landing pages for use | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md b/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md new file mode 100644 index 0000000..c25583d --- /dev/null +++ b/docs/SubAccountDetailsResponsePlanInfoFeaturesUsers.md @@ -0,0 +1,11 @@ +# SubAccountDetailsResponsePlanInfoFeaturesUsers + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Quantity** | **int64** | Quantity of multi-account's provided | [optional] [default to null] +**Remaining** | **int64** | Available multi-accounts for use | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountUpdatePlanRequest.md b/docs/SubAccountUpdatePlanRequest.md new file mode 100644 index 0000000..3b4e4b1 --- /dev/null +++ b/docs/SubAccountUpdatePlanRequest.md @@ -0,0 +1,11 @@ +# SubAccountUpdatePlanRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Credits** | [***SubAccountUpdatePlanRequestCredits**](SubAccountUpdatePlanRequestCredits.md) | | [optional] [default to null] +**Features** | [***SubAccountUpdatePlanRequestFeatures**](SubAccountUpdatePlanRequestFeatures.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountUpdatePlanRequestCredits.md b/docs/SubAccountUpdatePlanRequestCredits.md new file mode 100644 index 0000000..790ca85 --- /dev/null +++ b/docs/SubAccountUpdatePlanRequestCredits.md @@ -0,0 +1,10 @@ +# SubAccountUpdatePlanRequestCredits + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **int64** | Number of email credits | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountUpdatePlanRequestFeatures.md b/docs/SubAccountUpdatePlanRequestFeatures.md new file mode 100644 index 0000000..d6d4f19 --- /dev/null +++ b/docs/SubAccountUpdatePlanRequestFeatures.md @@ -0,0 +1,12 @@ +# SubAccountUpdatePlanRequestFeatures + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Users** | **int64** | Number of multi-users | [optional] [default to null] +**LandingPage** | **int64** | Number of landing pages | [optional] [default to null] +**Inbox** | **int64** | Number of inboxes | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountsResponse.md b/docs/SubAccountsResponse.md new file mode 100644 index 0000000..8ac0c81 --- /dev/null +++ b/docs/SubAccountsResponse.md @@ -0,0 +1,11 @@ +# SubAccountsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **int32** | Total number of subaccounts | [optional] [default to null] +**SubAccounts** | [**[]SubAccountsResponseSubAccounts**](SubAccountsResponseSubAccounts.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubAccountsResponseSubAccounts.md b/docs/SubAccountsResponseSubAccounts.md new file mode 100644 index 0000000..b7a9a5f --- /dev/null +++ b/docs/SubAccountsResponseSubAccounts.md @@ -0,0 +1,13 @@ +# SubAccountsResponseSubAccounts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | id of the sub-account | [default to null] +**CompanyName** | **string** | Name of the sub-account company | [default to null] +**Active** | **bool** | Whether the sub-account is active or not | [default to null] +**CreatedAt** | **int64** | Timestamp when the sub-account was created | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Task.md b/docs/Task.md new file mode 100644 index 0000000..678c9fc --- /dev/null +++ b/docs/Task.md @@ -0,0 +1,15 @@ +# Task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Unique task id | [optional] [default to null] +**TaskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | [default to null] +**Name** | **string** | Name of task | [default to null] +**ContactsIds** | **[]int32** | Contact ids for contacts linked to this task | [optional] [default to null] +**DealsIds** | **[]string** | Deal ids for deals a task is linked to | [optional] [default to null] +**CompaniesIds** | **[]string** | Companies ids for companies a task is linked to | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskList.md b/docs/TaskList.md new file mode 100644 index 0000000..fd66d36 --- /dev/null +++ b/docs/TaskList.md @@ -0,0 +1,10 @@ +# TaskList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]Task**](Task.md) | List of tasks | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskReminder.md b/docs/TaskReminder.md new file mode 100644 index 0000000..92a66d3 --- /dev/null +++ b/docs/TaskReminder.md @@ -0,0 +1,12 @@ +# TaskReminder + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **int32** | Value of time unit before reminder is to be sent | [default to null] +**Unit** | **string** | Unit of time before reminder is to be sent | [default to null] +**Types** | **[]string** | Type of task reminder e.g email, push | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TaskTypes.md b/docs/TaskTypes.md new file mode 100644 index 0000000..4aad092 --- /dev/null +++ b/docs/TaskTypes.md @@ -0,0 +1,11 @@ +# TaskTypes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Id of task type | [optional] [default to null] +**Title** | **string** | Title of task type | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransactionalEmailsApi.md b/docs/TransactionalEmailsApi.md index 5ba8788..f6f08cd 100644 --- a/docs/TransactionalEmailsApi.md +++ b/docs/TransactionalEmailsApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.TransactionalEmailsApi +# \TransactionalEmailsApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -8,25 +8,28 @@ Method | HTTP request | Description [**CreateSmtpTemplate**](TransactionalEmailsApi.md#CreateSmtpTemplate) | **Post** /smtp/templates | Create an email template [**DeleteBlockedDomain**](TransactionalEmailsApi.md#DeleteBlockedDomain) | **Delete** /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains [**DeleteHardbounces**](TransactionalEmailsApi.md#DeleteHardbounces) | **Post** /smtp/deleteHardbounces | Delete hardbounces +[**DeleteScheduledEmailById**](TransactionalEmailsApi.md#DeleteScheduledEmailById) | **Delete** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId [**DeleteSmtpTemplate**](TransactionalEmailsApi.md#DeleteSmtpTemplate) | **Delete** /smtp/templates/{templateId} | Delete an inactive email template [**GetAggregatedSmtpReport**](TransactionalEmailsApi.md#GetAggregatedSmtpReport) | **Get** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time [**GetBlockedDomains**](TransactionalEmailsApi.md#GetBlockedDomains) | **Get** /smtp/blockedDomains | Get the list of blocked domains [**GetEmailEventReport**](TransactionalEmailsApi.md#GetEmailEventReport) | **Get** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +[**GetScheduledEmailByBatchId**](TransactionalEmailsApi.md#GetScheduledEmailByBatchId) | **Get** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +[**GetScheduledEmailByMessageId**](TransactionalEmailsApi.md#GetScheduledEmailByMessageId) | **Get** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId [**GetSmtpReport**](TransactionalEmailsApi.md#GetSmtpReport) | **Get** /smtp/statistics/reports | Get your transactional email activity aggregated per day [**GetSmtpTemplate**](TransactionalEmailsApi.md#GetSmtpTemplate) | **Get** /smtp/templates/{templateId} | Returns the template information [**GetSmtpTemplates**](TransactionalEmailsApi.md#GetSmtpTemplates) | **Get** /smtp/templates | Get the list of email templates [**GetTransacBlockedContacts**](TransactionalEmailsApi.md#GetTransacBlockedContacts) | **Get** /smtp/blockedContacts | Get the list of blocked or unsubscribed transactional contacts [**GetTransacEmailContent**](TransactionalEmailsApi.md#GetTransacEmailContent) | **Get** /smtp/emails/{uuid} | Get the personalized content of a sent transactional email [**GetTransacEmailsList**](TransactionalEmailsApi.md#GetTransacEmailsList) | **Get** /smtp/emails | Get the list of transactional emails on the basis of allowed filters -[**SendTemplate**](TransactionalEmailsApi.md#SendTemplate) | **Post** /smtp/templates/{templateId}/send | Send a template [**SendTestTemplate**](TransactionalEmailsApi.md#SendTestTemplate) | **Post** /smtp/templates/{templateId}/sendTest | Send a template to your test list [**SendTransacEmail**](TransactionalEmailsApi.md#SendTransacEmail) | **Post** /smtp/email | Send a transactional email [**SmtpBlockedContactsEmailDelete**](TransactionalEmailsApi.md#SmtpBlockedContactsEmailDelete) | **Delete** /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact [**SmtpLogMessageIdDelete**](TransactionalEmailsApi.md#SmtpLogMessageIdDelete) | **Delete** /smtp/log/{messageId} | Delete an SMTP transactional log [**UpdateSmtpTemplate**](TransactionalEmailsApi.md#UpdateSmtpTemplate) | **Put** /smtp/templates/{templateId} | Update an email template + # **BlockNewDomain** -> BlockNewDomain(ctx, body) +> BlockNewDomain(ctx, blockDomain) Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same @@ -36,7 +39,7 @@ Blocks a new domain in order to avoid messages being sent to the same Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**BlockDomain**](BlockDomain.md)| | + **blockDomain** | [**BlockDomain**](BlockDomain.md)| | ### Return type @@ -54,7 +57,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **CreateSmtpTemplate** -> CreateModel CreateSmtpTemplate(ctx, body) +> CreateModel CreateSmtpTemplate(ctx, smtpTemplate) Create an email template ### Required Parameters @@ -62,7 +65,7 @@ Create an email template Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateSmtpTemplate**](CreateSmtpTemplate.md)| values to update in transactional email template | + **smtpTemplate** | [**CreateSmtpTemplate**](CreateSmtpTemplate.md)| values to update in transactional email template | ### Return type @@ -102,7 +105,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -118,13 +121,42 @@ Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiDeleteHardbouncesOpts** | optional parameters | nil if no parameters + **optional** | ***DeleteHardbouncesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiDeleteHardbouncesOpts struct +Optional parameters are passed through a pointer to a DeleteHardbouncesOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **deleteHardbounces** | [**optional.Interface of DeleteHardbounces**](DeleteHardbounces.md)| values to delete hardbounces | + +### Return type + + (empty response body) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteScheduledEmailById** +> DeleteScheduledEmailById(ctx, identifier) +Delete scheduled emails by batchId or messageId + +Delete scheduled batch of emails by batchId or single scheduled email by messageId + +### Required Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of DeleteHardbounces**](DeleteHardbounces.md)| values to delete hardbounces | + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **identifier** | **string**| The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. | ### Return type @@ -162,7 +194,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -171,20 +203,23 @@ Name | Type | Description | Notes > GetAggregatedReport GetAggregatedSmtpReport(ctx, optional) Get your transactional email activity aggregated over a period of time +This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiGetAggregatedSmtpReportOpts** | optional parameters | nil if no parameters + **optional** | ***GetAggregatedSmtpReportOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiGetAggregatedSmtpReportOpts struct +Optional parameters are passed through a pointer to a GetAggregatedSmtpReportOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **startDate** | **optional.String**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | **endDate** | **optional.String**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | - **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | + **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | **tag** | **optional.String**| Tag of the emails | ### Return type @@ -197,7 +232,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -221,7 +256,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -230,22 +265,25 @@ This endpoint does not need any parameter. > GetEmailEventReport GetEmailEventReport(ctx, optional) Get all your transactional email activity (unaggregated events) +This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiGetEmailEventReportOpts** | optional parameters | nil if no parameters + **optional** | ***GetEmailEventReportOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiGetEmailEventReportOpts struct +Optional parameters are passed through a pointer to a GetEmailEventReportOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number limitation for the result returned | [default to 50] **offset** | **optional.Int64**| Beginning point in the list to retrieve from. | [default to 0] **startDate** | **optional.String**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | **endDate** | **optional.String**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | - **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | + **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | **email** | **optional.String**| Filter the report for a specific email addresses | **event** | **optional.String**| Filter the report for a specific event type | **tags** | **optional.String**| Filter the report for tags (serialized and urlencoded array) | @@ -263,7 +301,87 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetScheduledEmailByBatchId** +> GetScheduledEmailByBatchId GetScheduledEmailByBatchId(ctx, batchId, optional) +Fetch scheduled emails by batchId + +Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **batchId** | **string**| The batchId of scheduled emails batch (Should be a valid UUIDv4) | + **optional** | ***GetScheduledEmailByBatchIdOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetScheduledEmailByBatchIdOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **startDate** | **optional.String**| Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | + **endDate** | **optional.String**| Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | + **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] + **status** | **optional.String**| Filter the records by `status` of the scheduled email batch or message. | + **limit** | **optional.Int64**| Number of documents returned per page | [default to 100] + **offset** | **optional.Int64**| Index of the first document on the page | [default to 0] + +### Return type + +[**GetScheduledEmailByBatchId**](GetScheduledEmailByBatchId.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetScheduledEmailByMessageId** +> GetScheduledEmailByMessageId GetScheduledEmailByMessageId(ctx, messageId, optional) +Fetch scheduled email by messageId + +Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **messageId** | **string**| The messageId of scheduled email | + **optional** | ***GetScheduledEmailByMessageIdOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a GetScheduledEmailByMessageIdOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | + **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | + +### Return type + +[**GetScheduledEmailByMessageId**](GetScheduledEmailByMessageId.md) + +### Authorization + +[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) + +### HTTP request headers + + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -277,17 +395,18 @@ Get your transactional email activity aggregated per day Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiGetSmtpReportOpts** | optional parameters | nil if no parameters + **optional** | ***GetSmtpReportOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiGetSmtpReportOpts struct +Optional parameters are passed through a pointer to a GetSmtpReportOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number of documents returned per page | [default to 10] **offset** | **optional.Int64**| Index of the first document on the page | [default to 0] **startDate** | **optional.String**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | **endDate** | **optional.String**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | - **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | + **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | **tag** | **optional.String**| Tag of the emails | **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] @@ -301,7 +420,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -327,7 +446,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -341,10 +460,11 @@ Get the list of email templates Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiGetSmtpTemplatesOpts** | optional parameters | nil if no parameters + **optional** | ***GetSmtpTemplatesOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiGetSmtpTemplatesOpts struct +Optional parameters are passed through a pointer to a GetSmtpTemplatesOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **templateStatus** | **optional.Bool**| Filter on the status of the template. Active = true, inactive = false | @@ -362,7 +482,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -376,10 +496,11 @@ Get the list of blocked or unsubscribed transactional contacts Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiGetTransacBlockedContactsOpts** | optional parameters | nil if no parameters + **optional** | ***GetTransacBlockedContactsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiGetTransacBlockedContactsOpts struct +Optional parameters are passed through a pointer to a GetTransacBlockedContactsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts | @@ -399,7 +520,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -425,7 +546,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -441,10 +562,11 @@ This endpoint will show the list of emails for past 30 days by default. To retri Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalEmailsApiGetTransacEmailsListOpts** | optional parameters | nil if no parameters + **optional** | ***GetTransacEmailsListOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalEmailsApiGetTransacEmailsListOpts struct +Optional parameters are passed through a pointer to a GetTransacEmailsListOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **email** | **optional.String**| Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. | @@ -453,6 +575,8 @@ Name | Type | Description | Notes **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. | **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] + **limit** | **optional.Int64**| Number of documents returned per page | [default to 500] + **offset** | **optional.Int64**| Index of the first document in the page | [default to 0] ### Return type @@ -462,35 +586,6 @@ Name | Type | Description | Notes [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **SendTemplate** -> SendTemplateEmail SendTemplate(ctx, body, templateId) -Send a template - -This endpoint is deprecated. Prefer v3/smtp/email instead. - -### Required Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendEmail**](SendEmail.md)| | - **templateId** | **int64**| Id of the template | - -### Return type - -[**SendTemplateEmail**](SendTemplateEmail.md) - -### Authorization - -[api-key](../README.md#api-key), [partner-key](../README.md#partner-key) - ### HTTP request headers - **Content-Type**: application/json @@ -499,7 +594,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendTestTemplate** -> SendTestTemplate(ctx, body, templateId) +> SendTestTemplate(ctx, templateId, sendTestEmail) Send a template to your test list ### Required Parameters @@ -507,8 +602,8 @@ Send a template to your test list Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendTestEmail**](SendTestEmail.md)| | **templateId** | **int64**| Id of the template | + **sendTestEmail** | [**SendTestEmail**](SendTestEmail.md)| | ### Return type @@ -526,7 +621,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendTransacEmail** -> CreateSmtpEmail SendTransacEmail(ctx, body) +> CreateSmtpEmail SendTransacEmail(ctx, sendSmtpEmail) Send a transactional email ### Required Parameters @@ -534,7 +629,7 @@ Send a transactional email Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendSmtpEmail**](SendSmtpEmail.md)| Values to send a transactional email | + **sendSmtpEmail** | [**SendSmtpEmail**](SendSmtpEmail.md)| Values to send a transactional email | ### Return type @@ -572,7 +667,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -598,13 +693,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateSmtpTemplate** -> UpdateSmtpTemplate(ctx, body, templateId) +> UpdateSmtpTemplate(ctx, templateId, smtpTemplate) Update an email template ### Required Parameters @@ -612,8 +707,8 @@ Update an email template Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateSmtpTemplate**](UpdateSmtpTemplate.md)| values to update in transactional email template | **templateId** | **int64**| id of the template | + **smtpTemplate** | [**UpdateSmtpTemplate**](UpdateSmtpTemplate.md)| values to update in transactional email template | ### Return type diff --git a/docs/TransactionalSMSApi.md b/docs/TransactionalSMSApi.md index 1157924..7b70fcd 100644 --- a/docs/TransactionalSMSApi.md +++ b/docs/TransactionalSMSApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.TransactionalSMSApi +# \TransactionalSMSApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -9,6 +9,7 @@ Method | HTTP request | Description [**GetTransacSmsReport**](TransactionalSMSApi.md#GetTransacSmsReport) | **Get** /transactionalSMS/statistics/reports | Get your SMS activity aggregated per day [**SendTransacSms**](TransactionalSMSApi.md#SendTransacSms) | **Post** /transactionalSMS/sms | Send SMS message to a mobile number + # **GetSmsEvents** > GetSmsEventReport GetSmsEvents(ctx, optional) Get all your SMS activity (unaggregated events) @@ -18,17 +19,18 @@ Get all your SMS activity (unaggregated events) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalSMSApiGetSmsEventsOpts** | optional parameters | nil if no parameters + **optional** | ***GetSmsEventsOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalSMSApiGetSmsEventsOpts struct +Optional parameters are passed through a pointer to a GetSmsEventsOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **optional.Int64**| Number of documents per page | [default to 50] **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | **offset** | **optional.Int64**| Index of the first document of the page | [default to 0] - **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | + **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | **phoneNumber** | **optional.String**| Filter the report for a specific phone number | **event** | **optional.String**| Filter the report for specific events | **tags** | **optional.String**| Filter the report for specific tags passed as a serialized urlencoded array | @@ -44,7 +46,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -58,10 +60,11 @@ Get your SMS activity aggregated over a period of time Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalSMSApiGetTransacAggregatedSmsReportOpts** | optional parameters | nil if no parameters + **optional** | ***GetTransacAggregatedSmsReportOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalSMSApiGetTransacAggregatedSmsReportOpts struct +Optional parameters are passed through a pointer to a GetTransacAggregatedSmsReportOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | @@ -79,7 +82,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -93,15 +96,16 @@ Get your SMS activity aggregated per day Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TransactionalSMSApiGetTransacSmsReportOpts** | optional parameters | nil if no parameters + **optional** | ***GetTransacSmsReportOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a TransactionalSMSApiGetTransacSmsReportOpts struct +Optional parameters are passed through a pointer to a GetTransacSmsReportOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **startDate** | **optional.String**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | **endDate** | **optional.String**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | - **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | + **days** | **optional.Int64**| Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | **tag** | **optional.String**| Filter on a tag | **sort** | **optional.String**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [default to desc] @@ -115,13 +119,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **SendTransacSms** -> SendSms SendTransacSms(ctx, body) +> SendSms SendTransacSms(ctx, sendTransacSms) Send SMS message to a mobile number ### Required Parameters @@ -129,7 +133,7 @@ Send SMS message to a mobile number Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**SendTransacSms**](SendTransacSms.md)| Values to send a transactional SMS | + **sendTransacSms** | [**SendTransacSms**](SendTransacSms.md)| Values to send a transactional SMS | ### Return type diff --git a/docs/UpdateAttribute.md b/docs/UpdateAttribute.md index 98a2e21..e05ae4f 100644 --- a/docs/UpdateAttribute.md +++ b/docs/UpdateAttribute.md @@ -3,8 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] -**Enumeration** | [**[]UpdateAttributeEnumeration**](UpdateAttributeEnumeration.md) | List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] [default to null] +**Value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] [default to null] +**Enumeration** | [**[]UpdateAttributeEnumeration**](UpdateAttributeEnumeration.md) | List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateAttributeEnumeration.md b/docs/UpdateAttributeEnumeration.md index c0aaa24..6e64db0 100644 --- a/docs/UpdateAttributeEnumeration.md +++ b/docs/UpdateAttributeEnumeration.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateBatchContacts.md b/docs/UpdateBatchContacts.md new file mode 100644 index 0000000..9621aad --- /dev/null +++ b/docs/UpdateBatchContacts.md @@ -0,0 +1,10 @@ +# UpdateBatchContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contacts** | [**[]UpdateBatchContactsContacts**](UpdateBatchContactsContacts.md) | List of contacts to be updated | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateBatchContactsContacts.md b/docs/UpdateBatchContactsContacts.md new file mode 100644 index 0000000..40d1160 --- /dev/null +++ b/docs/UpdateBatchContactsContacts.md @@ -0,0 +1,18 @@ +# UpdateBatchContactsContacts + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] [default to null] +**Id** | **int64** | id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] [default to null] +**Sms** | **string** | SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}** | [optional] [default to null] +**EmailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] [default to null] +**SmsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] [default to null] +**ListIds** | **[]int64** | Ids of the lists to add the contact to | [optional] [default to null] +**UnlinkListIds** | **[]int64** | Ids of the lists to remove the contact from | [optional] [default to null] +**SmtpBlacklistSender** | **[]string** | transactional email forbidden sender for contact. Use only for email Contact | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateBatchContactsModel.md b/docs/UpdateBatchContactsModel.md new file mode 100644 index 0000000..033936f --- /dev/null +++ b/docs/UpdateBatchContactsModel.md @@ -0,0 +1,11 @@ +# UpdateBatchContactsModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SuccessIds** | **[]int64** | | [optional] [default to null] +**FailureIds** | **[]int64** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCampaignStatus.md b/docs/UpdateCampaignStatus.md index b5c81e9..676780c 100644 --- a/docs/UpdateCampaignStatus.md +++ b/docs/UpdateCampaignStatus.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateChild.md b/docs/UpdateChild.md index 7809fe8..f7ab272 100644 --- a/docs/UpdateChild.md +++ b/docs/UpdateChild.md @@ -11,3 +11,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateChildAccountStatus.md b/docs/UpdateChildAccountStatus.md index 346bec8..405e79d 100644 --- a/docs/UpdateChildAccountStatus.md +++ b/docs/UpdateChildAccountStatus.md @@ -10,3 +10,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateChildDomain.md b/docs/UpdateChildDomain.md index d2b24ee..bcaa4f5 100644 --- a/docs/UpdateChildDomain.md +++ b/docs/UpdateChildDomain.md @@ -7,3 +7,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateContact.md b/docs/UpdateContact.md index 8efe18e..05078b1 100644 --- a/docs/UpdateContact.md +++ b/docs/UpdateContact.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Attributes** | [***interface{}**](interface{}.md) | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] [default to null] +**Attributes** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} | [optional] [default to null] **EmailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] [default to null] **SmsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] [default to null] **ListIds** | **[]int64** | Ids of the lists to add the contact to | [optional] [default to null] @@ -12,3 +12,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateEmailCampaign.md b/docs/UpdateEmailCampaign.md index 78e9352..e803785 100644 --- a/docs/UpdateEmailCampaign.md +++ b/docs/UpdateEmailCampaign.md @@ -6,31 +6,32 @@ Name | Type | Description | Notes **Tag** | **string** | Tag of the campaign | [optional] [default to null] **Sender** | [***UpdateEmailCampaignSender**](UpdateEmailCampaignSender.md) | | [optional] [default to null] **Name** | **string** | Name of the campaign | [optional] [default to null] -**HtmlContent** | **string** | Body of the message (HTML version). REQUIRED if htmlUrl is empty | [optional] [default to null] +**HtmlContent** | **string** | Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty | [optional] [default to null] **HtmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] [default to null] **ScheduledAt** | **string** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. If sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). | [optional] [default to null] **Subject** | **string** | Subject of the campaign | [optional] [default to null] **ReplyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] [default to null] -**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] +**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] **Recipients** | [***UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional] [default to null] **AttachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] [default to null] -**InlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. | [optional] [default to false] +**InlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. | [optional] [default to null] **MirrorActive** | **bool** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional] [default to null] -**Recurring** | **bool** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to false] +**Recurring** | **bool** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to null] **Footer** | **string** | Footer of the email campaign | [optional] [default to null] **Header** | **string** | Header of the email campaign | [optional] [default to null] **UtmCampaign** | **string** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional] [default to null] -**Params** | [***interface{}**](interface{}.md) | Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] [default to null] +**Params** | [**map[string]interface{}**](interface{}.md) | Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' | [optional] [default to null] **SendAtBestTime** | **bool** | Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. | [optional] [default to null] -**AbTesting** | **bool** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to false] +**AbTesting** | **bool** | Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B | [optional] [default to null] **SubjectA** | **string** | Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] **SubjectB** | **string** | Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] [default to null] -**SplitRule** | **int64** | Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] [default to null] -**WinnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record | [optional] [default to null] -**WinnerDelay** | **int64** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record | [optional] [default to null] -**IpWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] +**SplitRule** | **int64** | Add the size of your test groups. Considered if abTesting = true. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else | [optional] [default to null] +**WinnerCriteria** | **string** | Choose the metrics that will determinate the winning version. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerCriteria' is ignored if passed or alreday exist in record | [optional] [default to null] +**WinnerDelay** | **int64** | Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. Considered if 'splitRule' >= 1 and < 50. If splitRule = 50, 'winnerDelay' is ignored if passed or alreday exist in record | [optional] [default to null] +**IpWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to null] **InitialQuota** | **int64** | Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] [default to null] **IncreaseRate** | **int64** | Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateEmailCampaignRecipients.md b/docs/UpdateEmailCampaignRecipients.md index bdecb15..b2f1802 100644 --- a/docs/UpdateEmailCampaignRecipients.md +++ b/docs/UpdateEmailCampaignRecipients.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateEmailCampaignSender.md b/docs/UpdateEmailCampaignSender.md index 3130bd4..c3670de 100644 --- a/docs/UpdateEmailCampaignSender.md +++ b/docs/UpdateEmailCampaignSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateList.md b/docs/UpdateList.md index 619700c..0faa0ee 100644 --- a/docs/UpdateList.md +++ b/docs/UpdateList.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSender.md b/docs/UpdateSender.md index d11560a..eaec5bb 100644 --- a/docs/UpdateSender.md +++ b/docs/UpdateSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSmsCampaign.md b/docs/UpdateSmsCampaign.md index 3d318f5..f7fb6b1 100644 --- a/docs/UpdateSmsCampaign.md +++ b/docs/UpdateSmsCampaign.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **Content** | **string** | Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS | [optional] [default to null] **Recipients** | [***CreateSmsCampaignRecipients**](CreateSmsCampaignRecipients.md) | | [optional] [default to null] **ScheduledAt** | **string** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] [default to null] +**UnicodeEnabled** | **bool** | Format of the message. It indicates whether the content should be treated as unicode or not. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSmtpTemplate.md b/docs/UpdateSmtpTemplate.md index e22cb10..d3ee8b1 100644 --- a/docs/UpdateSmtpTemplate.md +++ b/docs/UpdateSmtpTemplate.md @@ -6,13 +6,14 @@ Name | Type | Description | Notes **Tag** | **string** | Tag of the template | [optional] [default to null] **Sender** | [***UpdateSmtpTemplateSender**](UpdateSmtpTemplateSender.md) | | [optional] [default to null] **TemplateName** | **string** | Name of the template | [optional] [default to null] -**HtmlContent** | **string** | Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) | [optional] [default to null] +**HtmlContent** | **string** | Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) | [optional] [default to null] **HtmlUrl** | **string** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] [default to null] **Subject** | **string** | Subject of the email | [optional] [default to null] **ReplyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] [default to null] -**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] +**ToField** | **string** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional] [default to null] **AttachmentUrl** | **string** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional] [default to null] **IsActive** | **bool** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateSmtpTemplateSender.md b/docs/UpdateSmtpTemplateSender.md index 572a1c3..d5a84ea 100644 --- a/docs/UpdateSmtpTemplateSender.md +++ b/docs/UpdateSmtpTemplateSender.md @@ -9,3 +9,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateWebhook.md b/docs/UpdateWebhook.md index 57a577b..02cda83 100644 --- a/docs/UpdateWebhook.md +++ b/docs/UpdateWebhook.md @@ -5,7 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Url** | **string** | URL of the webhook | [optional] [default to null] **Description** | **string** | Description of the webhook | [optional] [default to null] -**Events** | **[]string** | Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` and `delivered` | [optional] [default to null] +**Events** | **[]string** | - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` | [optional] [default to null] +**Domain** | **string** | Inbound domain of webhook, used in case of event type `inbound` | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UploadImageToGallery.md b/docs/UploadImageToGallery.md index 85f9bbf..7a20abe 100644 --- a/docs/UploadImageToGallery.md +++ b/docs/UploadImageToGallery.md @@ -8,3 +8,4 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index 3d73725..c055933 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -1,4 +1,4 @@ -# sib_api_v3_sdk.WebhooksApi +# \WebhooksApi All URIs are relative to *https://api.sendinblue.com/v3* @@ -10,8 +10,9 @@ Method | HTTP request | Description [**GetWebhooks**](WebhooksApi.md#GetWebhooks) | **Get** /webhooks | Get all webhooks [**UpdateWebhook**](WebhooksApi.md#UpdateWebhook) | **Put** /webhooks/{webhookId} | Update a webhook + # **CreateWebhook** -> CreateModel CreateWebhook(ctx, body) +> CreateModel CreateWebhook(ctx, createWebhook) Create a webhook ### Required Parameters @@ -19,7 +20,7 @@ Create a webhook Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**CreateWebhook**](CreateWebhook.md)| Values to create a webhook | + **createWebhook** | [**CreateWebhook**](CreateWebhook.md)| Values to create a webhook | ### Return type @@ -57,7 +58,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -83,7 +84,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -97,13 +98,15 @@ Get all webhooks Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***WebhooksApiGetWebhooksOpts** | optional parameters | nil if no parameters + **optional** | ***GetWebhooksOpts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a WebhooksApiGetWebhooksOpts struct +Optional parameters are passed through a pointer to a GetWebhooksOpts struct + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **type_** | **optional.String**| Filter on webhook type | [default to transactional] + **sort** | **optional.String**| Sort the results in the ascending/descending order of webhook creation | [default to desc] ### Return type @@ -115,13 +118,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **UpdateWebhook** -> UpdateWebhook(ctx, body, webhookId) +> UpdateWebhook(ctx, webhookId, updateWebhook) Update a webhook ### Required Parameters @@ -129,8 +132,8 @@ Update a webhook Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **body** | [**UpdateWebhook**](UpdateWebhook.md)| Values to update a webhook | **webhookId** | **int64**| Id of the webhook | + **updateWebhook** | [**UpdateWebhook**](UpdateWebhook.md)| Values to update a webhook | ### Return type diff --git a/go.mod b/go.mod index 555ad13..a2b431f 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,15 @@ -module github.com/sendinblue/APIv3-go-library +module github.com/sendinblue/APIv3-go-library/v2 -go 1.16 +go 1.17 require ( github.com/antihax/optional v1.0.0 - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 + golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb +) + +require ( + github.com/golang/protobuf v1.4.2 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + google.golang.org/appengine v1.6.6 // indirect + google.golang.org/protobuf v1.25.0 // indirect ) diff --git a/go.sum b/go.sum index 8fe27cf..952c702 100644 --- a/go.sum +++ b/go.sum @@ -178,15 +178,16 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= -golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -220,11 +221,15 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/lib/.gitignore b/lib/.gitignore deleted file mode 100644 index daf913b..0000000 --- a/lib/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof diff --git a/lib/.swagger-codegen-ignore b/lib/.swagger-codegen-ignore deleted file mode 100644 index c5fa491..0000000 --- a/lib/.swagger-codegen-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/lib/.swagger-codegen/VERSION b/lib/.swagger-codegen/VERSION deleted file mode 100644 index 812aaaf..0000000 --- a/lib/.swagger-codegen/VERSION +++ /dev/null @@ -1 +0,0 @@ -3.0.22 \ No newline at end of file diff --git a/lib/.travis.yml b/lib/.travis.yml deleted file mode 100644 index f5cb2ce..0000000 --- a/lib/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go - -install: - - go get -d -v . - -script: - - go build -v ./ - diff --git a/lib/api_account.go b/lib/api_account.go index 9e08133..0ba406c 100644 --- a/lib/api_account.go +++ b/lib/api_account.go @@ -7,6 +7,7 @@ * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( @@ -27,6 +28,7 @@ type AccountApiService service /* AccountApiService Get your account information, plan and credits details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetAccount */ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.Response, error) { @@ -46,7 +48,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -117,6 +119,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetAccount err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -127,6 +130,7 @@ func (a *AccountApiService) GetAccount(ctx context.Context) (GetAccount, *http.R newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_account_test.go b/lib/api_account_test.go deleted file mode 100644 index 8446d4e..0000000 --- a/lib/api_account_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package lib - -import ( - "context" - "fmt" - "testing" -) - -func TestGetAccount(t *testing.T) { - var ctx context.Context - var cli = APIClient{ - cfg: NewConfiguration(), - } - sib := NewAPIClient(cli.cfg) - result, resp, err := sib.AccountApi.GetAccount(ctx) - if err != nil { - fmt.Println("===in get account error===") - t.Fatal(err) - } - fmt.Println("====Account Result:", result, " ==== resp:", resp) -} diff --git a/lib/api_attributes.go b/lib/api_attributes.go index 15c5e59..f361495 100644 --- a/lib/api_attributes.go +++ b/lib/api_attributes.go @@ -1,22 +1,22 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" ) // Linger please @@ -25,21 +25,22 @@ var ( ) type AttributesApiService service + /* AttributesApiService Create contact attribute * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create an attribute * @param attributeCategory Category of the attribute * @param attributeName Name of the attribute + * @param createAttribute Values to create an attribute + */ -func (a *AttributesApiService) CreateAttribute(ctx context.Context, body CreateAttribute, attributeCategory string, attributeName string) (*http.Response, error) { +func (a *AttributesApiService) CreateAttribute(ctx context.Context, attributeCategory string, attributeName string, createAttribute CreateAttribute) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -69,7 +70,7 @@ func (a *AttributesApiService) CreateAttribute(ctx context.Context, body CreateA localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createAttribute if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -80,7 +81,7 @@ func (a *AttributesApiService) CreateAttribute(ctx context.Context, body CreateA key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -93,7 +94,7 @@ func (a *AttributesApiService) CreateAttribute(ctx context.Context, body CreateA key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -112,33 +113,36 @@ func (a *AttributesApiService) CreateAttribute(ctx context.Context, body CreateA return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* AttributesApiService Delete an attribute * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param attributeCategory Category of the attribute * @param attributeName Name of the existing attribute + */ func (a *AttributesApiService) DeleteAttribute(ctx context.Context, attributeCategory string, attributeName string) (*http.Response, error) { var ( @@ -146,7 +150,6 @@ func (a *AttributesApiService) DeleteAttribute(ctx context.Context, attributeCat localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -159,7 +162,7 @@ func (a *AttributesApiService) DeleteAttribute(ctx context.Context, attributeCat localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -185,7 +188,7 @@ func (a *AttributesApiService) DeleteAttribute(ctx context.Context, attributeCat key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -198,7 +201,7 @@ func (a *AttributesApiService) DeleteAttribute(ctx context.Context, attributeCat key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -217,48 +220,52 @@ func (a *AttributesApiService) DeleteAttribute(ctx context.Context, attributeCat return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* AttributesApiService List all attributes * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetAttributes */ func (a *AttributesApiService) GetAttributes(ctx context.Context) (GetAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAttributes ) @@ -270,7 +277,7 @@ func (a *AttributesApiService) GetAttributes(ctx context.Context) (GetAttributes localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -296,7 +303,7 @@ func (a *AttributesApiService) GetAttributes(ctx context.Context) (GetAttributes key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -309,7 +316,7 @@ func (a *AttributesApiService) GetAttributes(ctx context.Context) (GetAttributes key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -330,47 +337,50 @@ func (a *AttributesApiService) GetAttributes(ctx context.Context) (GetAttributes if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* AttributesApiService Update contact attribute * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update an attribute * @param attributeCategory Category of the attribute * @param attributeName Name of the existing attribute + * @param updateAttribute Values to update an attribute + */ -func (a *AttributesApiService) UpdateAttribute(ctx context.Context, body UpdateAttribute, attributeCategory string, attributeName string) (*http.Response, error) { +func (a *AttributesApiService) UpdateAttribute(ctx context.Context, attributeCategory string, attributeName string, updateAttribute UpdateAttribute) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -400,7 +410,7 @@ func (a *AttributesApiService) UpdateAttribute(ctx context.Context, body UpdateA localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateAttribute if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -411,7 +421,7 @@ func (a *AttributesApiService) UpdateAttribute(ctx context.Context, body UpdateA key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -424,7 +434,7 @@ func (a *AttributesApiService) UpdateAttribute(ctx context.Context, body UpdateA key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -443,32 +453,34 @@ func (a *AttributesApiService) UpdateAttribute(ctx context.Context, body UpdateA return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_companies.go b/lib/api_companies.go new file mode 100644 index 0000000..5d64a62 --- /dev/null +++ b/lib/api_companies.go @@ -0,0 +1,918 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type CompaniesApiService service + +/* +CompaniesApiService Get company attributes + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return CompanyAttributes +*/ +func (a *CompaniesApiService) CompaniesAttributesGet(ctx context.Context) (CompanyAttributes, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CompanyAttributes + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies/attributes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v CompanyAttributes + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CompaniesApiService Get all companies + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *CompaniesGetOpts - Optional Parameters: + * @param "Filters" (optional.String) - Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"5b1a17d914b73d35a76ca0c7\"} + * @param "LinkedContactsIds" (optional.Int64) - Filter by linked contacts ids + * @param "LinkedDealsIds" (optional.String) - Filter by linked deals ids + * @param "Page" (optional.Int64) - Index of the first document of the page + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + * @param "SortBy" (optional.String) - The field used to sort field names. + +@return CompaniesList +*/ + +type CompaniesGetOpts struct { + Filters optional.String + LinkedContactsIds optional.Int64 + LinkedDealsIds optional.String + Page optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String +} + +func (a *CompaniesApiService) CompaniesGet(ctx context.Context, localVarOptionals *CompaniesGetOpts) (CompaniesList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CompaniesList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Filters.IsSet() { + localVarQueryParams.Add("filters", parameterToString(localVarOptionals.Filters.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.LinkedContactsIds.IsSet() { + localVarQueryParams.Add("linkedContactsIds", parameterToString(localVarOptionals.LinkedContactsIds.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.LinkedDealsIds.IsSet() { + localVarQueryParams.Add("linkedDealsIds", parameterToString(localVarOptionals.LinkedDealsIds.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortBy.IsSet() { + localVarQueryParams.Add("sortBy", parameterToString(localVarOptionals.SortBy.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v CompaniesList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CompaniesApiService Delete a company + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + + +*/ +func (a *CompaniesApiService) CompaniesIdDelete(ctx context.Context, id string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CompaniesApiService Get a company + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + +@return Company +*/ +func (a *CompaniesApiService) CompaniesIdGet(ctx context.Context, id string) (Company, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Company + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Company + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CompaniesApiService Update a company + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Updated company details. + +@return Company +*/ +func (a *CompaniesApiService) CompaniesIdPatch(ctx context.Context, id string, body Body3) (Company, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Company + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Company + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CompaniesApiService Link and Unlink company with contacts and deals + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Linked / Unlinked contacts and deals ids. + + +*/ +func (a *CompaniesApiService) CompaniesLinkUnlinkIdPatch(ctx context.Context, id string, body Body4) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies/link-unlink/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CompaniesApiService Create a company + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Company create data. + +@return InlineResponse200 +*/ +func (a *CompaniesApiService) CompaniesPost(ctx context.Context, body Body2) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/companies" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_contacts.go b/lib/api_contacts.go index 5fa536f..78768ae 100644 --- a/lib/api_contacts.go +++ b/lib/api_contacts.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,19 +27,21 @@ var ( ) type ContactsApiService service + /* ContactsApiService Add existing contacts to a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Emails addresses OR IDs of the contacts * @param listId Id of the list + * @param contactEmails Emails addresses OR IDs of the contacts + @return PostContactInfo */ -func (a *ContactsApiService) AddContactToList(ctx context.Context, body AddContactToList, listId int64) (PostContactInfo, *http.Response, error) { +func (a *ContactsApiService) AddContactToList(ctx context.Context, listId int64, contactEmails AddContactToList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -68,7 +71,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, body AddConta localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &contactEmails if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -79,7 +82,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, body AddConta key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +95,7 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, body AddConta key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,67 +116,72 @@ func (a *ContactsApiService) AddContactToList(ctx context.Context, body AddConta if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Create contact attribute * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create an attribute * @param attributeCategory Category of the attribute * @param attributeName Name of the attribute + * @param createAttribute Values to create an attribute + */ -func (a *ContactsApiService) CreateAttribute(ctx context.Context, body CreateAttribute, attributeCategory string, attributeName string) (*http.Response, error) { +func (a *ContactsApiService) CreateAttribute(ctx context.Context, attributeCategory string, attributeName string, createAttribute CreateAttribute) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -203,7 +211,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, body CreateAtt localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createAttribute if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -214,7 +222,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, body CreateAtt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -227,7 +235,7 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, body CreateAtt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -246,39 +254,42 @@ func (a *ContactsApiService) CreateAttribute(ctx context.Context, body CreateAtt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Create a contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create a contact + * @param createContact Values to create a contact + @return CreateUpdateContactModel */ -func (a *ContactsApiService) CreateContact(ctx context.Context, body CreateContact) (CreateUpdateContactModel, *http.Response, error) { +func (a *ContactsApiService) CreateContact(ctx context.Context, createContact CreateContact) (CreateUpdateContactModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateUpdateContactModel ) @@ -307,7 +318,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, body CreateConta localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createContact if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -318,7 +329,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, body CreateConta key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -331,7 +342,7 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, body CreateConta key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -352,65 +363,70 @@ func (a *ContactsApiService) CreateContact(ctx context.Context, body CreateConta if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateUpdateContactModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 204 { var v CreateUpdateContactModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Create Contact via DOI (Double-Opt-In) Flow * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create the Double opt-in (DOI) contact + * @param createDoiContact Values to create the Double opt-in (DOI) contact + */ -func (a *ContactsApiService) CreateDoiContact(ctx context.Context, body CreateDoiContact) (*http.Response, error) { +func (a *ContactsApiService) CreateDoiContact(ctx context.Context, createDoiContact CreateDoiContact) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -438,7 +454,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, body CreateDo localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createDoiContact if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -449,7 +465,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, body CreateDo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -462,7 +478,7 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, body CreateDo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -481,39 +497,42 @@ func (a *ContactsApiService) CreateDoiContact(ctx context.Context, body CreateDo return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Create a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Name of the folder + * @param createFolder Name of the folder + @return CreateModel */ -func (a *ContactsApiService) CreateFolder(ctx context.Context, body CreateUpdateFolder) (CreateModel, *http.Response, error) { +func (a *ContactsApiService) CreateFolder(ctx context.Context, createFolder CreateUpdateFolder) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -542,7 +561,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, body CreateUpdate localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createFolder if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -553,7 +572,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, body CreateUpdate key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -566,7 +585,7 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, body CreateUpdate key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -587,54 +606,59 @@ func (a *ContactsApiService) CreateFolder(ctx context.Context, body CreateUpdate if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Create a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create a list + * @param createList Values to create a list + @return CreateModel */ -func (a *ContactsApiService) CreateList(ctx context.Context, body CreateList) (CreateModel, *http.Response, error) { +func (a *ContactsApiService) CreateList(ctx context.Context, createList CreateList) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -663,7 +687,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, body CreateList) (C localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createList if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -674,7 +698,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, body CreateList) (C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -687,7 +711,7 @@ func (a *ContactsApiService) CreateList(ctx context.Context, body CreateList) (C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -708,48 +732,53 @@ func (a *ContactsApiService) CreateList(ctx context.Context, body CreateList) (C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Delete an attribute * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param attributeCategory Category of the attribute * @param attributeName Name of the existing attribute + */ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCategory string, attributeName string) (*http.Response, error) { var ( @@ -757,7 +786,6 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -770,7 +798,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -796,7 +824,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -809,7 +837,7 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -828,42 +856,46 @@ func (a *ContactsApiService) DeleteAttribute(ctx context.Context, attributeCateg return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Delete a contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact + */ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier string) (*http.Response, error) { var ( @@ -871,7 +903,6 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -883,7 +914,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -909,7 +940,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -922,7 +953,7 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -941,52 +972,57 @@ func (a *ContactsApiService) DeleteContact(ctx context.Context, identifier strin return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 405 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Delete a folder (and all its lists) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder + */ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) (*http.Response, error) { var ( @@ -994,7 +1030,6 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1006,7 +1041,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1032,7 +1067,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1045,7 +1080,7 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1064,42 +1099,46 @@ func (a *ContactsApiService) DeleteFolder(ctx context.Context, folderId int64) ( return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Delete a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list + */ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*http.Response, error) { var ( @@ -1107,7 +1146,6 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1119,7 +1157,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1145,7 +1183,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1158,7 +1196,7 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1177,48 +1215,52 @@ func (a *ContactsApiService) DeleteList(ctx context.Context, listId int64) (*htt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService List all attributes * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetAttributes */ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAttributes ) @@ -1230,7 +1272,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1256,7 +1298,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1269,7 +1311,7 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1290,44 +1332,58 @@ func (a *ContactsApiService) GetAttributes(ctx context.Context) (GetAttributes, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetAttributes - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* -ContactsApiService Get a contact's details +ContactsApiService Get a contact's details +Along with the contact details, this endpoint will show the statistics of contact for the recent 90 days by default. To fetch the earlier statistics, please use Get contact campaign stats (https://developers.sendinblue.com/reference/contacts-7#getcontactstats) endpoint with the appropriate date ranges. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact OR its SMS attribute value + * @param optional nil or *GetContactInfoOpts - Optional Parameters: + * @param "StartDate" (optional.Interface of interface{}) - **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate + * @param "EndDate" (optional.Interface of interface{}) - **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. + @return GetExtendedContactDetails */ -func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier string) (GetExtendedContactDetails, *http.Response, error) { + +type GetContactInfoOpts struct { + StartDate optional.Interface + EndDate optional.Interface +} + +func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier string, localVarOptionals *GetContactInfoOpts) (GetExtendedContactDetails, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedContactDetails ) @@ -1339,8 +1395,14 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if localVarOptionals != nil && localVarOptionals.StartDate.IsSet() { + localVarQueryParams.Add("startDate", parameterToString(localVarOptionals.StartDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndDate.IsSet() { + localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) + } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1366,7 +1428,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1379,7 +1441,7 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1400,73 +1462,79 @@ func (a *ContactsApiService) GetContactInfo(ctx context.Context, identifier stri if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedContactDetails - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* -ContactsApiService Get email campaigns' statistics for a contact +ContactsApiService Get email campaigns' statistics for a contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param identifier Email (urlencoded) OR ID of the contact - * @param optional nil or *ContactsApiGetContactStatsOpts - Optional Parameters: + * @param optional nil or *GetContactStatsOpts - Optional Parameters: * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate - * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate + * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate. Maximum difference between startDate and endDate should not be greater than 90 days + @return GetContactCampaignStats */ -type ContactsApiGetContactStatsOpts struct { - StartDate optional.String - EndDate optional.String +type GetContactStatsOpts struct { + StartDate optional.String + EndDate optional.String } -func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier string, localVarOptionals *ContactsApiGetContactStatsOpts) (GetContactCampaignStats, *http.Response, error) { +func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier string, localVarOptionals *GetContactStatsOpts) (GetContactCampaignStats, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContactCampaignStats ) @@ -1485,7 +1553,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1511,7 +1579,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1524,7 +1592,7 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1545,76 +1613,82 @@ func (a *ContactsApiService) GetContactStats(ctx context.Context, identifier str if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetContactCampaignStats - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Get all the contacts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ContactsApiGetContactsOpts - Optional Parameters: + * @param optional nil or *GetContactsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetContacts */ -type ContactsApiGetContactsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - ModifiedSince optional.String - Sort optional.String +type GetContactsOpts struct { + Limit optional.Int64 + Offset optional.Int64 + ModifiedSince optional.String + Sort optional.String } -func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals *ContactsApiGetContactsOpts) (GetContacts, *http.Response, error) { +func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals *GetContactsOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -1638,7 +1712,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1664,7 +1738,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1677,7 +1751,7 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1698,67 +1772,72 @@ func (a *ContactsApiService) GetContacts(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Get contacts in a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list - * @param optional nil or *ContactsApiGetContactsFromListOpts - Optional Parameters: + * @param optional nil or *GetContactsFromListOpts - Optional Parameters: * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetContacts */ -type ContactsApiGetContactsFromListOpts struct { - ModifiedSince optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetContactsFromListOpts struct { + ModifiedSince optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *ContactsApiGetContactsFromListOpts) (GetContacts, *http.Response, error) { +func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *GetContactsFromListOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -1783,7 +1862,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1809,7 +1888,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1822,7 +1901,7 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1843,64 +1922,70 @@ func (a *ContactsApiService) GetContactsFromList(ctx context.Context, listId int if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* -ContactsApiService Returns a folder's details +ContactsApiService Returns a folder's details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId id of the folder + @return GetFolder */ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (GetFolder, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolder ) @@ -1913,7 +1998,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1939,7 +2024,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1952,7 +2037,7 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1973,75 +2058,81 @@ func (a *ContactsApiService) GetFolder(ctx context.Context, folderId int64) (Get if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolder - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Get lists in a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder - * @param optional nil or *ContactsApiGetFolderListsOpts - Optional Parameters: + * @param optional nil or *GetFolderListsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetFolderLists */ -type ContactsApiGetFolderListsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetFolderListsOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *ContactsApiGetFolderListsOpts) (GetFolderLists, *http.Response, error) { +func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolderLists ) @@ -2063,7 +2154,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -2089,7 +2180,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2102,7 +2193,7 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2123,72 +2214,78 @@ func (a *ContactsApiService) GetFolderLists(ctx context.Context, folderId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolderLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Get all folders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param limit Number of documents per page * @param offset Index of the first document of the page - * @param optional nil or *ContactsApiGetFoldersOpts - Optional Parameters: + * @param optional nil or *GetFoldersOpts - Optional Parameters: * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetFolders */ -type ContactsApiGetFoldersOpts struct { - Sort optional.String +type GetFoldersOpts struct { + Sort optional.String } -func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *ContactsApiGetFoldersOpts) (GetFolders, *http.Response, error) { +func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *GetFoldersOpts) (GetFolders, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolders ) @@ -2208,7 +2305,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -2234,7 +2331,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2247,7 +2344,7 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2268,54 +2365,59 @@ func (a *ContactsApiService) GetFolders(ctx context.Context, limit int64, offset if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolders - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* -ContactsApiService Get a list's details +ContactsApiService Get a list's details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list + @return GetExtendedList */ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExtendedList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedList ) @@ -2328,7 +2430,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -2354,7 +2456,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2367,7 +2469,7 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2388,74 +2490,80 @@ func (a *ContactsApiService) GetList(ctx context.Context, listId int64) (GetExte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Get all the lists * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ContactsApiGetListsOpts - Optional Parameters: + * @param optional nil or *GetListsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetLists */ -type ContactsApiGetListsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetListsOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *ContactsApiGetListsOpts) (GetLists, *http.Response, error) { +func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *GetListsOpts) (GetLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetLists ) @@ -2476,7 +2584,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Co localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -2502,7 +2610,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2515,7 +2623,7 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2536,55 +2644,60 @@ func (a *ContactsApiService) GetLists(ctx context.Context, localVarOptionals *Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Import contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + * @param requestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns`` + @return CreatedProcessId */ -func (a *ContactsApiService) ImportContacts(ctx context.Context, body RequestContactImport) (CreatedProcessId, *http.Response, error) { +func (a *ContactsApiService) ImportContacts(ctx context.Context, requestContactImport RequestContactImport) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -2613,7 +2726,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, body RequestCon localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &requestContactImport if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2624,7 +2737,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, body RequestCon key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2637,7 +2750,7 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, body RequestCon key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2658,55 +2771,60 @@ func (a *ContactsApiService) ImportContacts(ctx context.Context, body RequestCon if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Delete a contact from a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Emails addresses OR IDs of the contacts * @param listId Id of the list + * @param contactEmails Emails addresses OR IDs of the contacts + @return PostContactInfo */ -func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, body RemoveContactFromList, listId int64) (PostContactInfo, *http.Response, error) { +func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, listId int64, contactEmails RemoveContactFromList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -2736,7 +2854,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, body Rem localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &contactEmails if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2747,7 +2865,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, body Rem key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2760,7 +2878,7 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, body Rem key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2781,65 +2899,71 @@ func (a *ContactsApiService) RemoveContactFromList(ctx context.Context, body Rem if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Export contacts It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to request a contact export + * @param requestContactExport Values to request a contact export + @return CreatedProcessId */ -func (a *ContactsApiService) RequestContactExport(ctx context.Context, body RequestContactExport) (CreatedProcessId, *http.Response, error) { +func (a *ContactsApiService) RequestContactExport(ctx context.Context, requestContactExport RequestContactExport) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -2868,7 +2992,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, body Requ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &requestContactExport if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2879,7 +3003,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, body Requ key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2892,7 +3016,7 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, body Requ key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2913,57 +3037,61 @@ func (a *ContactsApiService) RequestContactExport(ctx context.Context, body Requ if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ContactsApiService Update contact attribute * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update an attribute * @param attributeCategory Category of the attribute * @param attributeName Name of the existing attribute + * @param updateAttribute Values to update an attribute + */ -func (a *ContactsApiService) UpdateAttribute(ctx context.Context, body UpdateAttribute, attributeCategory string, attributeName string) (*http.Response, error) { +func (a *ContactsApiService) UpdateAttribute(ctx context.Context, attributeCategory string, attributeName string, updateAttribute UpdateAttribute) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2993,7 +3121,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, body UpdateAtt localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateAttribute if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -3004,7 +3132,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, body UpdateAtt key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3017,7 +3145,7 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, body UpdateAtt key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3036,51 +3164,171 @@ func (a *ContactsApiService) UpdateAttribute(ctx context.Context, body UpdateAtt return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +ContactsApiService Update multiple contacts + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param updateBatchContacts Values to update multiple contacts + + +*/ +func (a *ContactsApiService) UpdateBatchContacts(ctx context.Context, updateBatchContacts UpdateBatchContacts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/contacts/batch" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updateBatchContacts + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 207 { + var v UpdateBatchContactsModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Update a contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update a contact * @param identifier Email (urlencoded) OR ID of the contact + * @param updateContact Values to update a contact + */ -func (a *ContactsApiService) UpdateContact(ctx context.Context, body UpdateContact, identifier string) (*http.Response, error) { +func (a *ContactsApiService) UpdateContact(ctx context.Context, identifier string, updateContact UpdateContact) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3109,7 +3357,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, body UpdateConta localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateContact if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -3120,7 +3368,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, body UpdateConta key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3133,7 +3381,7 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, body UpdateConta key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3152,51 +3400,54 @@ func (a *ContactsApiService) UpdateContact(ctx context.Context, body UpdateConta return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Update a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Name of the folder * @param folderId Id of the folder + * @param updateFolder Name of the folder + */ -func (a *ContactsApiService) UpdateFolder(ctx context.Context, body CreateUpdateFolder, folderId int64) (*http.Response, error) { +func (a *ContactsApiService) UpdateFolder(ctx context.Context, folderId int64, updateFolder CreateUpdateFolder) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3225,7 +3476,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, body CreateUpdate localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateFolder if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -3236,7 +3487,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, body CreateUpdate key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3249,7 +3500,7 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, body CreateUpdate key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3268,51 +3519,54 @@ func (a *ContactsApiService) UpdateFolder(ctx context.Context, body CreateUpdate return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ContactsApiService Update a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update a list * @param listId Id of the list + * @param updateList Values to update a list + */ -func (a *ContactsApiService) UpdateList(ctx context.Context, body UpdateList, listId int64) (*http.Response, error) { +func (a *ContactsApiService) UpdateList(ctx context.Context, listId int64, updateList UpdateList) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -3341,7 +3595,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, body UpdateList, li localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateList if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -3352,7 +3606,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, body UpdateList, li key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -3365,7 +3619,7 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, body UpdateList, li key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -3384,32 +3638,34 @@ func (a *ContactsApiService) UpdateList(ctx context.Context, body UpdateList, li return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_contacts_test.go b/lib/api_contacts_test.go deleted file mode 100644 index f63b2ea..0000000 --- a/lib/api_contacts_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package lib - -import ( - "context" - "fmt" - "math/rand" - "testing" -) - -func TestCreateContact(t *testing.T) { - var ctx context.Context - var cli = APIClient{ - cfg: NewConfiguration(), - } - sib := NewAPIClient(cli.cfg) - email := getTestEmailUnique() - - var params = CreateContact{ - Email: email, - } - - model, response, err := sib.ContactsApi.CreateContact(ctx, params) - if err != nil { - fmt.Println("===in get createContact error===") - t.Fatal(err) - } - fmt.Println("====Contact Model:", model, " ==== Response:", response, " ====error==== ", err) -} - -func TestUpdateContact(t *testing.T) { - var ctx context.Context - var cli = APIClient{ - cfg: NewConfiguration(), - } - sib := NewAPIClient(cli.cfg) - email := "test+4600995338790023574@sendinblue.com" - - var params = UpdateContact{ - ListIds: []int64{10}, - } - - response, err := sib.ContactsApi.UpdateContact(ctx, params, email) - if err != nil { - fmt.Println("===in get Update Contact error===") - t.Fatal(err) - } - fmt.Println("====Contact Update Model==== Response:", response, " ====error==== ", err) -} - -func TestGetContact(t *testing.T) { - var ctx context.Context - var cli = APIClient{ - cfg: NewConfiguration(), - } - sib := NewAPIClient(cli.cfg) - - //var params = *ContactsApiGetContactsOpts{} - - response, res, err := sib.ContactsApi.GetContacts(ctx, nil) - if err != nil { - fmt.Println("===in get Get Contact error===") - t.Fatal(err) - } - fmt.Println("====Contact Get Model==== Response:", response, " ====error==== ", err, res) -} - -const ( - testEmail = "test@sendinblue.com" - testEmailUnique = "test+%d@sendinblue.com" -) - -func getTestEmailUnique() string { - return fmt.Sprintf(testEmailUnique, rand.Int63()) -} diff --git a/lib/api_crm.go b/lib/api_crm.go new file mode 100644 index 0000000..191a5fe --- /dev/null +++ b/lib/api_crm.go @@ -0,0 +1,1502 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type CRMApiService service + +/* +CRMApiService Get all notes + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *CrmNotesGetOpts - Optional Parameters: + * @param "Entity" (optional.String) - Filter by note entity type + * @param "EntityIds" (optional.String) - Filter by note entity IDs + * @param "DateFrom" (optional.Int32) - dateFrom to date range filter type (timestamp in milliseconds) + * @param "DateTo" (optional.Int32) - dateTo to date range filter type (timestamp in milliseconds) + * @param "Offset" (optional.Int64) - Index of the first document of the page + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + +@return NoteList +*/ + +type CrmNotesGetOpts struct { + Entity optional.String + EntityIds optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String +} + +func (a *CRMApiService) CrmNotesGet(ctx context.Context, localVarOptionals *CrmNotesGetOpts) (NoteList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue NoteList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/notes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Entity.IsSet() { + localVarQueryParams.Add("entity", parameterToString(localVarOptionals.Entity.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EntityIds.IsSet() { + localVarQueryParams.Add("entityIds", parameterToString(localVarOptionals.EntityIds.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.DateFrom.IsSet() { + localVarQueryParams.Add("dateFrom", parameterToString(localVarOptionals.DateFrom.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.DateTo.IsSet() { + localVarQueryParams.Add("dateTo", parameterToString(localVarOptionals.DateTo.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v NoteList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CRMApiService Delete a note + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Note ID to delete + + +*/ +func (a *CRMApiService) CrmNotesIdDelete(ctx context.Context, id string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/notes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CRMApiService Get a note + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Note ID to get + +@return Note +*/ +func (a *CRMApiService) CrmNotesIdGet(ctx context.Context, id string) (Note, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Note + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/notes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Note + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CRMApiService Update a note + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Note ID to update + * @param body Note data to update a note + + +*/ +func (a *CRMApiService) CrmNotesIdPatch(ctx context.Context, id string, body NoteData) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/notes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 415 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CRMApiService Create a note + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Note data to create a note. + +@return NoteId +*/ +func (a *CRMApiService) CrmNotesPost(ctx context.Context, body NoteData) (NoteId, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue NoteId + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/notes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v NoteId + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 415 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CRMApiService Get all tasks + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *CrmTasksGetOpts - Optional Parameters: + * @param "FilterType" (optional.String) - Filter by task type (ID) + * @param "FilterStatus" (optional.String) - Filter by task status + * @param "FilterDate" (optional.String) - Filter by date + * @param "FilterAssignTo" (optional.String) - Filter by assignTo id + * @param "FilterContacts" (optional.String) - Filter by contact ids + * @param "FilterDeals" (optional.String) - Filter by deals ids + * @param "FilterCompanies" (optional.String) - Filter by companies ids + * @param "DateFrom" (optional.Int32) - dateFrom to date range filter type (timestamp in milliseconds) + * @param "DateTo" (optional.Int32) - dateTo to date range filter type (timestamp in milliseconds) + * @param "Offset" (optional.Int64) - Index of the first document of the page + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + * @param "SortBy" (optional.String) - The field used to sort field names. + +@return TaskList +*/ + +type CrmTasksGetOpts struct { + FilterType optional.String + FilterStatus optional.String + FilterDate optional.String + FilterAssignTo optional.String + FilterContacts optional.String + FilterDeals optional.String + FilterCompanies optional.String + DateFrom optional.Int32 + DateTo optional.Int32 + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String +} + +func (a *CRMApiService) CrmTasksGet(ctx context.Context, localVarOptionals *CrmTasksGetOpts) (TaskList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TaskList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/tasks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.FilterType.IsSet() { + localVarQueryParams.Add("filter[type]", parameterToString(localVarOptionals.FilterType.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterStatus.IsSet() { + localVarQueryParams.Add("filter[status]", parameterToString(localVarOptionals.FilterStatus.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterDate.IsSet() { + localVarQueryParams.Add("filter[date]", parameterToString(localVarOptionals.FilterDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterAssignTo.IsSet() { + localVarQueryParams.Add("filter[assignTo]", parameterToString(localVarOptionals.FilterAssignTo.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterContacts.IsSet() { + localVarQueryParams.Add("filter[contacts]", parameterToString(localVarOptionals.FilterContacts.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterDeals.IsSet() { + localVarQueryParams.Add("filter[deals]", parameterToString(localVarOptionals.FilterDeals.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterCompanies.IsSet() { + localVarQueryParams.Add("filter[companies]", parameterToString(localVarOptionals.FilterCompanies.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.DateFrom.IsSet() { + localVarQueryParams.Add("dateFrom", parameterToString(localVarOptionals.DateFrom.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.DateTo.IsSet() { + localVarQueryParams.Add("dateTo", parameterToString(localVarOptionals.DateTo.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortBy.IsSet() { + localVarQueryParams.Add("sortBy", parameterToString(localVarOptionals.SortBy.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v TaskList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CRMApiService Delete a task + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + + +*/ +func (a *CRMApiService) CrmTasksIdDelete(ctx context.Context, id string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/tasks/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CRMApiService Get a task + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + +@return Task +*/ +func (a *CRMApiService) CrmTasksIdGet(ctx context.Context, id string) (Task, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Task + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/tasks/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Task + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CRMApiService Update a task + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Updated task details. + + +*/ +func (a *CRMApiService) CrmTasksIdPatch(ctx context.Context, id string, body Body6) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/tasks/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CRMApiService Create a task + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Task name. + +@return InlineResponse2011 +*/ +func (a *CRMApiService) CrmTasksPost(ctx context.Context, body Body5) (InlineResponse2011, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse2011 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/tasks" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v InlineResponse2011 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CRMApiService Get all task types + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return TaskTypes +*/ +func (a *CRMApiService) CrmTasktypesGet(ctx context.Context) (TaskTypes, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TaskTypes + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/tasktypes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v TaskTypes + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_deals.go b/lib/api_deals.go new file mode 100644 index 0000000..6b07609 --- /dev/null +++ b/lib/api_deals.go @@ -0,0 +1,902 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type DealsApiService service + +/* +DealsApiService Get deal attributes + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return DealAttributes +*/ +func (a *DealsApiService) CrmAttributesDealsGet(ctx context.Context) (DealAttributes, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DealAttributes + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/attributes/deals" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DealAttributes + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DealsApiService Get all deals + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *CrmDealsGetOpts - Optional Parameters: + * @param "FilterAttributes" (optional.String) - Filter by attrbutes. If you have filter for owner on your side please send it as `attributes.owner`.\" + * @param "FilterLinkedCompaniesIds" (optional.String) - Filter by linked companies ids + * @param "FilterLinkedContactsIds" (optional.String) - Filter by linked companies ids + * @param "Offset" (optional.Int64) - Index of the first document of the page + * @param "Limit" (optional.Int64) - Number of documents per page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed + * @param "SortBy" (optional.String) - The field used to sort field names. + +@return DealsList +*/ + +type CrmDealsGetOpts struct { + FilterAttributes optional.String + FilterLinkedCompaniesIds optional.String + FilterLinkedContactsIds optional.String + Offset optional.Int64 + Limit optional.Int64 + Sort optional.String + SortBy optional.String +} + +func (a *DealsApiService) CrmDealsGet(ctx context.Context, localVarOptionals *CrmDealsGetOpts) (DealsList, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DealsList + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/deals" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.FilterAttributes.IsSet() { + localVarQueryParams.Add("filter[attributes]", parameterToString(localVarOptionals.FilterAttributes.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterLinkedCompaniesIds.IsSet() { + localVarQueryParams.Add("filter[linkedCompaniesIds]", parameterToString(localVarOptionals.FilterLinkedCompaniesIds.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.FilterLinkedContactsIds.IsSet() { + localVarQueryParams.Add("filter[linkedContactsIds]", parameterToString(localVarOptionals.FilterLinkedContactsIds.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.SortBy.IsSet() { + localVarQueryParams.Add("sortBy", parameterToString(localVarOptionals.SortBy.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DealsList + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DealsApiService Delete a deal + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + + +*/ +func (a *DealsApiService) CrmDealsIdDelete(ctx context.Context, id string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/deals/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +DealsApiService Get a deal + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + +@return Deal +*/ +func (a *DealsApiService) CrmDealsIdGet(ctx context.Context, id string) (Deal, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Deal + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/deals/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Deal + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DealsApiService Update a deal + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id + * @param body Updated deal details. + + +*/ +func (a *DealsApiService) CrmDealsIdPatch(ctx context.Context, id string, body Body1) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Patch") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/deals/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +DealsApiService Create a deal + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body Deal create data. + +@return InlineResponse201 +*/ +func (a *DealsApiService) CrmDealsPost(ctx context.Context, body Body) (InlineResponse201, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse201 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/deals" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v InlineResponse201 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +DealsApiService Get pipeline stages + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return Pipeline +*/ +func (a *DealsApiService) CrmPipelineDetailsGet(ctx context.Context) (Pipeline, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Pipeline + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/crm/pipeline/details" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v Pipeline + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_email_campaigns.go b/lib/api_email_campaigns.go index 7922dfc..2b00052 100644 --- a/lib/api_email_campaigns.go +++ b/lib/api_email_campaigns.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,18 +27,20 @@ var ( ) type EmailCampaignsApiService service + /* EmailCampaignsApiService Create an email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create a campaign + * @param emailCampaigns Values to create a campaign + @return CreateModel */ -func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, body CreateEmailCampaign) (CreateModel, *http.Response, error) { +func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, emailCampaigns CreateEmailCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -66,7 +69,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, body localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &emailCampaigns if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -77,7 +80,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, body key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +93,7 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, body key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,47 +114,52 @@ func (a *EmailCampaignsApiService) CreateEmailCampaign(ctx context.Context, body if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* EmailCampaignsApiService Delete an email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId id of the campaign + */ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -159,7 +167,6 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -171,7 +178,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -197,7 +204,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -210,7 +217,7 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -229,56 +236,60 @@ func (a *EmailCampaignsApiService) DeleteEmailCampaign(ctx context.Context, camp return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* EmailCampaignsApiService Export the recipients of an email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign - * @param optional nil or *EmailCampaignsApiEmailExportRecipientsOpts - Optional Parameters: - * @param "Body" (optional.Interface of EmailExportRecipients) - Values to send for a recipient export request + * @param optional nil or *EmailExportRecipientsOpts - Optional Parameters: + * @param "RecipientExport" (optional.Interface of EmailExportRecipients) - Values to send for a recipient export request + @return CreatedProcessId */ -type EmailCampaignsApiEmailExportRecipientsOpts struct { - Body optional.Interface +type EmailExportRecipientsOpts struct { + RecipientExport optional.Interface } -func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, campaignId int64, localVarOptionals *EmailCampaignsApiEmailExportRecipientsOpts) (CreatedProcessId, *http.Response, error) { +func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, campaignId int64, localVarOptionals *EmailExportRecipientsOpts) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -308,10 +319,13 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody + if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() { + + localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(EmailExportRecipients) + if !localVarOptionalRecipientExportok { + return localVarReturnValue, nil, reportError("recipientExport should be EmailExportRecipients") + } + localVarPostBody = &localVarOptionalRecipientExport } if ctx != nil { // API Key Authentication @@ -323,7 +337,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -336,7 +350,7 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -357,65 +371,71 @@ func (a *EmailCampaignsApiService) EmailExportRecipients(ctx context.Context, ca if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* EmailCampaignsApiService Get an A/B test email campaign results Obtain winning version of an A/B test email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the A/B test campaign + @return AbTestCampaignResult */ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, campaignId int64) (AbTestCampaignResult, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue AbTestCampaignResult ) @@ -428,7 +448,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -454,7 +474,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -467,7 +487,7 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -488,74 +508,81 @@ func (a *EmailCampaignsApiService) GetAbTestCampaignResult(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v AbTestCampaignResult - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 405 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* EmailCampaignsApiService Get an email campaign report * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign + @return GetEmailCampaign */ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaignId int64) (GetEmailCampaign, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailCampaign ) @@ -568,7 +595,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -594,7 +621,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -607,7 +634,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -628,82 +655,88 @@ func (a *EmailCampaignsApiService) GetEmailCampaign(ctx context.Context, campaig if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetEmailCampaign - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* EmailCampaignsApiService Return all your created email campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *EmailCampaignsApiGetEmailCampaignsOpts - Optional Parameters: + * @param optional nil or *GetEmailCampaignsOpts - Optional Parameters: * @param "Type_" (optional.String) - Filter on the type of the campaigns * @param "Status" (optional.String) - Filter on the status of the campaign - * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) - * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) + * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) + * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetEmailCampaigns */ -type EmailCampaignsApiGetEmailCampaignsOpts struct { - Type_ optional.String - Status optional.String - StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetEmailCampaignsOpts struct { + Type_ optional.String + Status optional.String + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localVarOptionals *EmailCampaignsApiGetEmailCampaignsOpts) (GetEmailCampaigns, *http.Response, error) { +func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localVarOptionals *GetEmailCampaignsOpts) (GetEmailCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailCampaigns ) @@ -736,7 +769,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -745,7 +778,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV } // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json", "applications/json"} + localVarHttpHeaderAccepts := []string{"application/json"} // set Accept header localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) @@ -762,7 +795,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -775,7 +808,7 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -796,55 +829,60 @@ func (a *EmailCampaignsApiService) GetEmailCampaigns(ctx context.Context, localV if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetEmailCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* EmailCampaignsApiService Get a shared template url Get a unique URL to share & import an email template from one Sendinblue account to another. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign or template + @return GetSharedTemplateUrl */ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, campaignId int64) (GetSharedTemplateUrl, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSharedTemplateUrl ) @@ -857,7 +895,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -883,7 +921,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -896,7 +934,7 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -917,57 +955,63 @@ func (a *EmailCampaignsApiService) GetSharedTemplateUrl(ctx context.Context, cam if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSharedTemplateUrl - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* EmailCampaignsApiService Send an email campaign immediately, based on campaignId * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId Id of the campaign + */ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -975,7 +1019,6 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -987,7 +1030,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1013,7 +1056,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1026,7 +1069,7 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1045,62 +1088,66 @@ func (a *EmailCampaignsApiService) SendEmailCampaignNow(ctx context.Context, cam return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* EmailCampaignsApiService Send the report of a campaign A PDF will be sent to the specified email addresses * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values for send a report * @param campaignId Id of the campaign + * @param sendReport Values for send a report + */ -func (a *EmailCampaignsApiService) SendReport(ctx context.Context, body SendReport, campaignId int64) (*http.Response, error) { +func (a *EmailCampaignsApiService) SendReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1129,7 +1176,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, body SendRepo localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &sendReport if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1140,7 +1187,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, body SendRepo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1153,7 +1200,7 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, body SendRepo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1172,51 +1219,54 @@ func (a *EmailCampaignsApiService) SendReport(ctx context.Context, body SendRepo return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* EmailCampaignsApiService Send an email campaign to your test list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body * @param campaignId Id of the campaign + * @param emailTo + */ -func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, body SendTestEmail, campaignId int64) (*http.Response, error) { +func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, campaignId int64, emailTo SendTestEmail) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1245,7 +1295,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, body SendT localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &emailTo if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1256,7 +1306,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, body SendT key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1269,7 +1319,7 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, body SendT key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1288,51 +1338,54 @@ func (a *EmailCampaignsApiService) SendTestEmail(ctx context.Context, body SendT return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* EmailCampaignsApiService Update an email campaign status * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Status of the campaign * @param campaignId Id of the campaign + * @param status Status of the campaign + */ -func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, body UpdateCampaignStatus, campaignId int64) (*http.Response, error) { +func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1361,7 +1414,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, bod localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &status if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1372,7 +1425,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, bod key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1385,7 +1438,7 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, bod key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1404,51 +1457,54 @@ func (a *EmailCampaignsApiService) UpdateCampaignStatus(ctx context.Context, bod return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* EmailCampaignsApiService Update an email campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update a campaign * @param campaignId Id of the campaign + * @param emailCampaign Values to update a campaign + */ -func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, body UpdateEmailCampaign, campaignId int64) (*http.Response, error) { +func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, campaignId int64, emailCampaign UpdateEmailCampaign) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1477,7 +1533,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, body localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &emailCampaign if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1488,7 +1544,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, body key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1501,7 +1557,7 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, body key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1520,50 +1576,53 @@ func (a *EmailCampaignsApiService) UpdateEmailCampaign(ctx context.Context, body return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* -EmailCampaignsApiService Upload an image to your account's image gallery +EmailCampaignsApiService Upload an image to your account's image gallery * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Parameters to upload an image + * @param uploadImage Parameters to upload an image + */ -func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, body UploadImageToGallery) (*http.Response, error) { +func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, uploadImage UploadImageToGallery) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1591,7 +1650,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, bod localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &uploadImage if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1602,7 +1661,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, bod key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1615,7 +1674,7 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, bod key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1634,22 +1693,23 @@ func (a *EmailCampaignsApiService) UploadImageToGallery(ctx context.Context, bod return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_email_campaigns_test.go b/lib/api_email_campaigns_test.go deleted file mode 100644 index ddbd9da..0000000 --- a/lib/api_email_campaigns_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package lib - -import ( - "context" - "fmt" - "testing" - - "github.com/antihax/optional" -) - -func TestCreateEmailCampaign(t *testing.T) { - var ctx context.Context - var cli = APIClient{ - cfg: NewConfiguration(), - } - sib := NewAPIClient(cli.cfg) - s := &CreateEmailCampaignSender{ - Name: "raunak_jain", - Email: "shubham.upadhyay@sendinblue.com", - } - params := CreateEmailCampaign{ - Sender: s, - Name: "TestCampaign", - HtmlContent: "Hi There! welcome to SIB", - Subject: "Welcome!", - } - result, resp, err := sib.EmailCampaignsApi.CreateEmailCampaign(ctx, params) - if err != nil { - fmt.Println("===in CreateEmailCampaign error===") - t.Fatal(err) - } - fmt.Println("====CreateEmailCampaign Result:", result, " ==== resp:", resp) -} - -func TestGetEmailCampaigns(t *testing.T) { - var ctx context.Context - var cli = APIClient{ - cfg: NewConfiguration(), - } - sib := NewAPIClient(cli.cfg) - - params := &EmailCampaignsApiGetEmailCampaignsOpts{ - Limit: optional.NewInt64(10), - } - result, resp, err := sib.EmailCampaignsApi.GetEmailCampaigns(ctx, params) - if err != nil { - fmt.Println("===in Get All EmailCampaign error===") - t.Fatal(err) - } - fmt.Println("====GetEmailCampaigns Result:", result, " ==== resp:", resp) -} diff --git a/lib/api_folders.go b/lib/api_folders.go index d091380..866ca55 100644 --- a/lib/api_folders.go +++ b/lib/api_folders.go @@ -1,23 +1,22 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -26,18 +25,20 @@ var ( ) type FoldersApiService service + /* FoldersApiService Create a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Name of the folder + * @param createFolder Name of the folder + @return CreateModel */ -func (a *FoldersApiService) CreateFolder(ctx context.Context, body CreateUpdateFolder) (CreateModel, *http.Response, error) { +func (a *FoldersApiService) CreateFolder(ctx context.Context, createFolder CreateUpdateFolder) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -66,7 +67,7 @@ func (a *FoldersApiService) CreateFolder(ctx context.Context, body CreateUpdateF localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createFolder if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -77,7 +78,7 @@ func (a *FoldersApiService) CreateFolder(ctx context.Context, body CreateUpdateF key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +91,7 @@ func (a *FoldersApiService) CreateFolder(ctx context.Context, body CreateUpdateF key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,47 +112,52 @@ func (a *FoldersApiService) CreateFolder(ctx context.Context, body CreateUpdateF if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* FoldersApiService Delete a folder (and all its lists) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder + */ func (a *FoldersApiService) DeleteFolder(ctx context.Context, folderId int64) (*http.Response, error) { var ( @@ -159,7 +165,6 @@ func (a *FoldersApiService) DeleteFolder(ctx context.Context, folderId int64) (* localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -171,7 +176,7 @@ func (a *FoldersApiService) DeleteFolder(ctx context.Context, folderId int64) (* localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -197,7 +202,7 @@ func (a *FoldersApiService) DeleteFolder(ctx context.Context, folderId int64) (* key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -210,7 +215,7 @@ func (a *FoldersApiService) DeleteFolder(ctx context.Context, folderId int64) (* key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -229,49 +234,53 @@ func (a *FoldersApiService) DeleteFolder(ctx context.Context, folderId int64) (* return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* -FoldersApiService Returns a folder's details +FoldersApiService Returns a folder's details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId id of the folder + @return GetFolder */ func (a *FoldersApiService) GetFolder(ctx context.Context, folderId int64) (GetFolder, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolder ) @@ -284,7 +293,7 @@ func (a *FoldersApiService) GetFolder(ctx context.Context, folderId int64) (GetF localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -310,7 +319,7 @@ func (a *FoldersApiService) GetFolder(ctx context.Context, folderId int64) (GetF key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -323,7 +332,7 @@ func (a *FoldersApiService) GetFolder(ctx context.Context, folderId int64) (GetF key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -344,75 +353,75 @@ func (a *FoldersApiService) GetFolder(ctx context.Context, folderId int64) (GetF if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolder - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* FoldersApiService Get lists in a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder - * @param optional nil or *FoldersApiGetFolderListsOpts - Optional Parameters: + * @param optional nil or *GetFolderListsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetFolderLists */ -type FoldersApiGetFolderListsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String -} - -func (a *FoldersApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *FoldersApiGetFolderListsOpts) (GetFolderLists, *http.Response, error) { +func (a *FoldersApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolderLists ) @@ -434,7 +443,7 @@ func (a *FoldersApiService) GetFolderLists(ctx context.Context, folderId int64, localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -460,7 +469,7 @@ func (a *FoldersApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -473,7 +482,7 @@ func (a *FoldersApiService) GetFolderLists(ctx context.Context, folderId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -494,72 +503,74 @@ func (a *FoldersApiService) GetFolderLists(ctx context.Context, folderId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolderLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* FoldersApiService Get all folders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param limit Number of documents per page * @param offset Index of the first document of the page - * @param optional nil or *FoldersApiGetFoldersOpts - Optional Parameters: + * @param optional nil or *GetFoldersOpts - Optional Parameters: * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetFolders */ -type FoldersApiGetFoldersOpts struct { - Sort optional.String -} - -func (a *FoldersApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *FoldersApiGetFoldersOpts) (GetFolders, *http.Response, error) { +func (a *FoldersApiService) GetFolders(ctx context.Context, limit int64, offset int64, localVarOptionals *GetFoldersOpts) (GetFolders, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolders ) @@ -579,7 +590,7 @@ func (a *FoldersApiService) GetFolders(ctx context.Context, limit int64, offset localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -605,7 +616,7 @@ func (a *FoldersApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -618,7 +629,7 @@ func (a *FoldersApiService) GetFolders(ctx context.Context, limit int64, offset key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -639,56 +650,60 @@ func (a *FoldersApiService) GetFolders(ctx context.Context, limit int64, offset if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolders - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* FoldersApiService Update a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Name of the folder * @param folderId Id of the folder + * @param updateFolder Name of the folder + */ -func (a *FoldersApiService) UpdateFolder(ctx context.Context, body CreateUpdateFolder, folderId int64) (*http.Response, error) { +func (a *FoldersApiService) UpdateFolder(ctx context.Context, folderId int64, updateFolder CreateUpdateFolder) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -717,7 +732,7 @@ func (a *FoldersApiService) UpdateFolder(ctx context.Context, body CreateUpdateF localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateFolder if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -728,7 +743,7 @@ func (a *FoldersApiService) UpdateFolder(ctx context.Context, body CreateUpdateF key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -741,7 +756,7 @@ func (a *FoldersApiService) UpdateFolder(ctx context.Context, body CreateUpdateF key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -760,32 +775,34 @@ func (a *FoldersApiService) UpdateFolder(ctx context.Context, body CreateUpdateF return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_inbound_parsing.go b/lib/api_inbound_parsing.go new file mode 100644 index 0000000..3832404 --- /dev/null +++ b/lib/api_inbound_parsing.go @@ -0,0 +1,314 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" + + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type InboundParsingApiService service + +/* +InboundParsingApiService Get the list of all the events for the received emails. +This endpoint will show the list of all the events for the received emails. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param optional nil or *GetInboundEmailEventsOpts - Optional Parameters: + * @param "Sender" (optional.String) - Email address of the sender. + * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. + * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + * @param "Limit" (optional.Int64) - Number of documents returned per page + * @param "Offset" (optional.Int64) - Index of the first document on the page + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation + +@return GetInboundEmailEvents +*/ + +type GetInboundEmailEventsOpts struct { + Sender optional.String + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String +} + +func (a *InboundParsingApiService) GetInboundEmailEvents(ctx context.Context, localVarOptionals *GetInboundEmailEventsOpts) (GetInboundEmailEvents, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetInboundEmailEvents + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/inbound/events" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { + localVarQueryParams.Add("sender", parameterToString(localVarOptionals.Sender.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.StartDate.IsSet() { + localVarQueryParams.Add("startDate", parameterToString(localVarOptionals.StartDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndDate.IsSet() { + localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetInboundEmailEvents + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +InboundParsingApiService Fetch all events history for one particular received email. +This endpoint will show the list of all events history for one particular received email. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param uuid UUID to fetch events specific to recieved email + +@return GetInboundEmailEventsByUuid +*/ +func (a *InboundParsingApiService) GetInboundEmailEventsByUuid(ctx context.Context, uuid string) (GetInboundEmailEventsByUuid, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetInboundEmailEventsByUuid + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/inbound/events/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetInboundEmailEventsByUuid + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_lists.go b/lib/api_lists.go index edb19a3..29d0f20 100644 --- a/lib/api_lists.go +++ b/lib/api_lists.go @@ -1,23 +1,22 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" - "github.com/antihax/optional" ) // Linger please @@ -26,19 +25,21 @@ var ( ) type ListsApiService service + /* ListsApiService Add existing contacts to a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Emails addresses OR IDs of the contacts * @param listId Id of the list + * @param contactEmails Emails addresses OR IDs of the contacts + @return PostContactInfo */ -func (a *ListsApiService) AddContactToList(ctx context.Context, body AddContactToList, listId int64) (PostContactInfo, *http.Response, error) { +func (a *ListsApiService) AddContactToList(ctx context.Context, listId int64, contactEmails AddContactToList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -68,7 +69,7 @@ func (a *ListsApiService) AddContactToList(ctx context.Context, body AddContactT localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &contactEmails if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -79,7 +80,7 @@ func (a *ListsApiService) AddContactToList(ctx context.Context, body AddContactT key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -92,7 +93,7 @@ func (a *ListsApiService) AddContactToList(ctx context.Context, body AddContactT key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -113,64 +114,70 @@ func (a *ListsApiService) AddContactToList(ctx context.Context, body AddContactT if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ListsApiService Create a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create a list + * @param createList Values to create a list + @return CreateModel */ -func (a *ListsApiService) CreateList(ctx context.Context, body CreateList) (CreateModel, *http.Response, error) { +func (a *ListsApiService) CreateList(ctx context.Context, createList CreateList) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -199,7 +206,7 @@ func (a *ListsApiService) CreateList(ctx context.Context, body CreateList) (Crea localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createList if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -210,7 +217,7 @@ func (a *ListsApiService) CreateList(ctx context.Context, body CreateList) (Crea key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -223,7 +230,7 @@ func (a *ListsApiService) CreateList(ctx context.Context, body CreateList) (Crea key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -244,47 +251,52 @@ func (a *ListsApiService) CreateList(ctx context.Context, body CreateList) (Crea if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ListsApiService Delete a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list + */ func (a *ListsApiService) DeleteList(ctx context.Context, listId int64) (*http.Response, error) { var ( @@ -292,7 +304,6 @@ func (a *ListsApiService) DeleteList(ctx context.Context, listId int64) (*http.R localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -304,7 +315,7 @@ func (a *ListsApiService) DeleteList(ctx context.Context, listId int64) (*http.R localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -330,7 +341,7 @@ func (a *ListsApiService) DeleteList(ctx context.Context, listId int64) (*http.R key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -343,7 +354,7 @@ func (a *ListsApiService) DeleteList(ctx context.Context, listId int64) (*http.R key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -362,62 +373,59 @@ func (a *ListsApiService) DeleteList(ctx context.Context, listId int64) (*http.R return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* ListsApiService Get contacts in a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list - * @param optional nil or *ListsApiGetContactsFromListOpts - Optional Parameters: + * @param optional nil or *GetContactsFromListOpts - Optional Parameters: * @param "ModifiedSince" (optional.String) - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetContacts */ -type ListsApiGetContactsFromListOpts struct { - ModifiedSince optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String -} - -func (a *ListsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *ListsApiGetContactsFromListOpts) (GetContacts, *http.Response, error) { +func (a *ListsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarOptionals *GetContactsFromListOpts) (GetContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetContacts ) @@ -442,7 +450,7 @@ func (a *ListsApiService) GetContactsFromList(ctx context.Context, listId int64, localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -468,7 +476,7 @@ func (a *ListsApiService) GetContactsFromList(ctx context.Context, listId int64, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -481,7 +489,7 @@ func (a *ListsApiService) GetContactsFromList(ctx context.Context, listId int64, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -502,75 +510,75 @@ func (a *ListsApiService) GetContactsFromList(ctx context.Context, listId int64, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ListsApiService Get lists in a folder * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param folderId Id of the folder - * @param optional nil or *ListsApiGetFolderListsOpts - Optional Parameters: + * @param optional nil or *GetFolderListsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetFolderLists */ -type ListsApiGetFolderListsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String -} - -func (a *ListsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *ListsApiGetFolderListsOpts) (GetFolderLists, *http.Response, error) { +func (a *ListsApiService) GetFolderLists(ctx context.Context, folderId int64, localVarOptionals *GetFolderListsOpts) (GetFolderLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetFolderLists ) @@ -592,7 +600,7 @@ func (a *ListsApiService) GetFolderLists(ctx context.Context, folderId int64, lo localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -618,7 +626,7 @@ func (a *ListsApiService) GetFolderLists(ctx context.Context, folderId int64, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -631,7 +639,7 @@ func (a *ListsApiService) GetFolderLists(ctx context.Context, folderId int64, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -652,64 +660,70 @@ func (a *ListsApiService) GetFolderLists(ctx context.Context, folderId int64, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetFolderLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* -ListsApiService Get a list's details +ListsApiService Get a list's details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param listId Id of the list + @return GetExtendedList */ func (a *ListsApiService) GetList(ctx context.Context, listId int64) (GetExtendedList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetExtendedList ) @@ -722,7 +736,7 @@ func (a *ListsApiService) GetList(ctx context.Context, listId int64) (GetExtende localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -748,7 +762,7 @@ func (a *ListsApiService) GetList(ctx context.Context, listId int64) (GetExtende key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -761,7 +775,7 @@ func (a *ListsApiService) GetList(ctx context.Context, listId int64) (GetExtende key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -782,74 +796,74 @@ func (a *ListsApiService) GetList(ctx context.Context, listId int64) (GetExtende if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetExtendedList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ListsApiService Get all the lists * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ListsApiGetListsOpts - Optional Parameters: + * @param optional nil or *GetListsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "Offset" (optional.Int64) - Index of the first document of the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetLists */ -type ListsApiGetListsOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String -} - -func (a *ListsApiService) GetLists(ctx context.Context, localVarOptionals *ListsApiGetListsOpts) (GetLists, *http.Response, error) { +func (a *ListsApiService) GetLists(ctx context.Context, localVarOptionals *GetListsOpts) (GetLists, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetLists ) @@ -870,7 +884,7 @@ func (a *ListsApiService) GetLists(ctx context.Context, localVarOptionals *Lists localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -896,7 +910,7 @@ func (a *ListsApiService) GetLists(ctx context.Context, localVarOptionals *Lists key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -909,7 +923,7 @@ func (a *ListsApiService) GetLists(ctx context.Context, localVarOptionals *Lists key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -930,55 +944,60 @@ func (a *ListsApiService) GetLists(ctx context.Context, localVarOptionals *Lists if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetLists - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ListsApiService Delete a contact from a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Emails addresses OR IDs of the contacts * @param listId Id of the list + * @param contactEmails Emails addresses OR IDs of the contacts + @return PostContactInfo */ -func (a *ListsApiService) RemoveContactFromList(ctx context.Context, body RemoveContactFromList, listId int64) (PostContactInfo, *http.Response, error) { +func (a *ListsApiService) RemoveContactFromList(ctx context.Context, listId int64, contactEmails RemoveContactFromList) (PostContactInfo, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue PostContactInfo ) @@ -1008,7 +1027,7 @@ func (a *ListsApiService) RemoveContactFromList(ctx context.Context, body Remove localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &contactEmails if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1019,7 +1038,7 @@ func (a *ListsApiService) RemoveContactFromList(ctx context.Context, body Remove key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1032,7 +1051,7 @@ func (a *ListsApiService) RemoveContactFromList(ctx context.Context, body Remove key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1053,66 +1072,71 @@ func (a *ListsApiService) RemoveContactFromList(ctx context.Context, body Remove if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v PostContactInfo - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ListsApiService Update a list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update a list * @param listId Id of the list + * @param updateList Values to update a list + */ -func (a *ListsApiService) UpdateList(ctx context.Context, body UpdateList, listId int64) (*http.Response, error) { +func (a *ListsApiService) UpdateList(ctx context.Context, listId int64, updateList UpdateList) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1141,7 +1165,7 @@ func (a *ListsApiService) UpdateList(ctx context.Context, body UpdateList, listI localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateList if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1152,7 +1176,7 @@ func (a *ListsApiService) UpdateList(ctx context.Context, body UpdateList, listI key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1165,7 +1189,7 @@ func (a *ListsApiService) UpdateList(ctx context.Context, body UpdateList, listI key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1184,32 +1208,34 @@ func (a *ListsApiService) UpdateList(ctx context.Context, body UpdateList, listI return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_master_account.go b/lib/api_master_account.go new file mode 100644 index 0000000..9e55fd0 --- /dev/null +++ b/lib/api_master_account.go @@ -0,0 +1,873 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type MasterAccountApiService service + +/* +MasterAccountApiService Get the details of requested master account +This endpoint will provide the details of the master account. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return MasterDetailsResponse +*/ +func (a *MasterAccountApiService) CorporateMasterAccountGet(ctx context.Context) (MasterDetailsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue MasterDetailsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/masterAccount" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v MasterDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Get the list of all the sub-accounts of the master account. +This endpoint will provide the list all the sub-accounts of the master account. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param offset Index of the first sub-account in the page + * @param limit Number of sub-accounts to be displayed on each page + +@return SubAccountsResponse +*/ +func (a *MasterAccountApiService) CorporateSubAccountGet(ctx context.Context, offset int32, limit int32) (SubAccountsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SubAccountsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("offset", parameterToString(offset, "")) + localVarQueryParams.Add("limit", parameterToString(limit, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v SubAccountsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Delete a sub-account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization to be deleted + + +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdDelete(ctx context.Context, id int64) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Get sub-account details +This endpoint will provide the details for the specified sub-account company + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization + +@return SubAccountDetailsResponse +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdGet(ctx context.Context, id int64) (SubAccountDetailsResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue SubAccountDetailsResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v SubAccountDetailsResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Update sub-account plan +This endpoint will update the sub-account plan + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param id Id of the sub-account organization + * @param updatePlanDetails Values to update a sub-account plan + + +*/ +func (a *MasterAccountApiService) CorporateSubAccountIdPlanPut(ctx context.Context, id int64, updatePlanDetails SubAccountUpdatePlanRequest) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/{id}/plan" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updatePlanDetails + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +MasterAccountApiService Create a new sub-account under a master account. +This endpoint will create a new sub-account under a master account + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param subAccountCreate values to create new sub-account + +@return CreateSubAccountResponse +*/ +func (a *MasterAccountApiService) CorporateSubAccountPost(ctx context.Context, subAccountCreate CreateSubAccount) (CreateSubAccountResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue CreateSubAccountResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &subAccountCreate + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v CreateSubAccountResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +MasterAccountApiService Generate SSO token to access Sendinblue +This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param ssoTokenRequest Values to generate SSO token for sub-account + +@return GetSsoToken +*/ +func (a *MasterAccountApiService) CorporateSubAccountSsoTokenPost(ctx context.Context, ssoTokenRequest SsoTokenRequest) (GetSsoToken, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetSsoToken + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/corporate/subAccount/ssoToken" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &ssoTokenRequest + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetSsoToken + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 403 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/lib/api_process.go b/lib/api_process.go index 6f4b340..edbf0e7 100644 --- a/lib/api_process.go +++ b/lib/api_process.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,18 +27,20 @@ var ( ) type ProcessApiService service + /* ProcessApiService Return the informations for a process * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param processId Id of the process + @return GetProcess */ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (GetProcess, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProcess ) @@ -50,7 +53,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -76,7 +79,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -89,7 +92,7 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,74 +113,80 @@ func (a *ProcessApiService) GetProcess(ctx context.Context, processId int64) (Ge if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetProcess - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* ProcessApiService Return all the processes for your account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ProcessApiGetProcessesOpts - Optional Parameters: + * @param optional nil or *GetProcessesOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number limitation for the result returned * @param "Offset" (optional.Int64) - Beginning point in the list to retrieve from. * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetProcesses */ -type ProcessApiGetProcessesOpts struct { - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetProcessesOpts struct { + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals *ProcessApiGetProcessesOpts) (GetProcesses, *http.Response, error) { +func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals *GetProcessesOpts) (GetProcesses, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetProcesses ) @@ -198,7 +207,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -224,7 +233,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -237,7 +246,7 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -258,37 +267,40 @@ func (a *ProcessApiService) GetProcesses(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetProcesses - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_reseller.go b/lib/api_reseller.go index 4a96368..f7301e3 100644 --- a/lib/api_reseller.go +++ b/lib/api_reseller.go @@ -7,6 +7,7 @@ * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( @@ -30,11 +31,12 @@ type ResellerApiService service /* ResellerApiService Add Email and/or SMS credits to a specific child account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to post to add credit to a specific child account - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param addCredits Values to post to add credit to a specific child account + @return RemainingCreditModel */ -func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, childIdentifier string) (RemainingCreditModel, *http.Response, error) { +func (a *ResellerApiService) AddCredits(ctx context.Context, childIdentifier string, addCredits AddCredits) (RemainingCreditModel, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -69,7 +71,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &addCredits if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -125,6 +127,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v RemainingCreditModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -135,6 +138,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -145,6 +149,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -155,6 +160,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -165,6 +171,7 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -174,11 +181,12 @@ func (a *ResellerApiService) AddCredits(ctx context.Context, body AddCredits, ch /* ResellerApiService Associate a dedicated IP to the child * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body IP to associate - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param ip IP to associate + */ -func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, body ManageIp, childIdentifier string) (*http.Response, error) { +func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -212,7 +220,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, body Manage localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &ip if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -260,6 +268,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, body Manage body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -270,6 +279,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, body Manage newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -280,6 +290,7 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, body Manage newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -289,11 +300,12 @@ func (a *ResellerApiService) AssociateIpToChild(ctx context.Context, body Manage /* ResellerApiService Create a domain for a child account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Sender domain to add for a specific child account. This will not be displayed to the parent account. - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param addChildDomain Sender domain to add for a specific child account. This will not be displayed to the parent account. + */ -func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChildDomain, childIdentifier string) (*http.Response, error) { +func (a *ResellerApiService) CreateChildDomain(ctx context.Context, childIdentifier string, addChildDomain AddChildDomain) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -327,7 +339,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChil localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &addChildDomain if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -375,6 +387,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChil body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -385,6 +398,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChil newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -395,6 +409,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChil newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -405,6 +420,7 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChil newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -414,16 +430,17 @@ func (a *ResellerApiService) CreateChildDomain(ctx context.Context, body AddChil /* ResellerApiService Creates a reseller child * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ResellerApiCreateResellerChildOpts - Optional Parameters: - * @param "Body" (optional.Interface of CreateChild) - reseller child to add + * @param optional nil or *CreateResellerChildOpts - Optional Parameters: + * @param "ResellerChild" (optional.Interface of CreateChild) - reseller child to add + @return CreateReseller */ -type ResellerApiCreateResellerChildOpts struct { - Body optional.Interface +type CreateResellerChildOpts struct { + ResellerChild optional.Interface } -func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOptionals *ResellerApiCreateResellerChildOpts) (CreateReseller, *http.Response, error) { +func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOptionals *CreateResellerChildOpts) (CreateReseller, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -457,10 +474,13 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { + if localVarOptionals != nil && localVarOptionals.ResellerChild.IsSet() { - localVarOptionalBody := localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody + localVarOptionalResellerChild, localVarOptionalResellerChildok := localVarOptionals.ResellerChild.Value().(CreateChild) + if !localVarOptionalResellerChildok { + return localVarReturnValue, nil, reportError("resellerChild should be CreateChild") + } + localVarPostBody = &localVarOptionalResellerChild } if ctx != nil { // API Key Authentication @@ -517,6 +537,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateReseller err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -527,6 +548,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -537,6 +559,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -547,6 +570,7 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -556,9 +580,10 @@ func (a *ResellerApiService) CreateResellerChild(ctx context.Context, localVarOp /* ResellerApiService Delete the sender domain of the reseller child based on the childIdentifier and domainName passed * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child * @param domainName Pass the existing domain that needs to be deleted + */ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentifier string, domainName string) (*http.Response, error) { var ( @@ -578,7 +603,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -641,6 +666,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -651,6 +677,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -661,6 +688,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -671,6 +699,7 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -680,7 +709,8 @@ func (a *ResellerApiService) DeleteChildDomain(ctx context.Context, childIdentif /* ResellerApiService Delete a single reseller child based on the child identifier supplied * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or child id of reseller's child + * @param childIdentifier Either auth key or child id of reseller's child + */ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdentifier string) (*http.Response, error) { @@ -700,7 +730,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -763,6 +793,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -773,6 +804,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -783,6 +815,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -793,6 +826,7 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -802,11 +836,12 @@ func (a *ResellerApiService) DeleteResellerChild(ctx context.Context, childIdent /* ResellerApiService Dissociate a dedicated IP to the child * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body IP to dissociate - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param ip IP to dissociate + */ -func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, body ManageIp, childIdentifier string) (*http.Response, error) { +func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, childIdentifier string, ip ManageIp) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -840,7 +875,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, body Man localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &ip if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -888,6 +923,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, body Man body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -898,6 +934,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, body Man newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -908,6 +945,7 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, body Man newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -915,9 +953,10 @@ func (a *ResellerApiService) DissociateIpFromChild(ctx context.Context, body Man } /* -ResellerApiService Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied +ResellerApiService Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + @return GetChildAccountCreationStatus */ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, childIdentifier string) (GetChildAccountCreationStatus, *http.Response, error) { @@ -938,7 +977,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1009,6 +1048,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetChildAccountCreationStatus err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1019,6 +1059,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1029,6 +1070,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1039,6 +1081,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1049,6 +1092,7 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1058,16 +1102,17 @@ func (a *ResellerApiService) GetChildAccountCreationStatus(ctx context.Context, /* ResellerApiService Get all sender domains for a specific child account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child -@return []AllOfgetChildDomainsItems + * @param childIdentifier Either auth key or id of reseller's child + +@return GetChildDomains */ -func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifier string) ([]string, *http.Response, error) { +func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifier string) (GetChildDomains, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue []string + localVarReturnValue GetChildDomains ) // create path and map variables @@ -1079,7 +1124,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1150,8 +1195,9 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { - var v []string + var v GetChildDomains err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1160,6 +1206,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1170,6 +1217,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1180,6 +1228,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1190,6 +1239,7 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1197,9 +1247,10 @@ func (a *ResellerApiService) GetChildDomains(ctx context.Context, childIdentifie } /* -ResellerApiService Get a child account's details +ResellerApiService Get a child account's details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + @return GetChildInfo */ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier string) (GetChildInfo, *http.Response, error) { @@ -1220,7 +1271,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1291,6 +1342,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetChildInfo err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1301,6 +1353,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1311,6 +1364,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1321,6 +1375,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1331,6 +1386,7 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1340,18 +1396,19 @@ func (a *ResellerApiService) GetChildInfo(ctx context.Context, childIdentifier s /* ResellerApiService Get the list of all children accounts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *ResellerApiGetResellerChildsOpts - Optional Parameters: + * @param optional nil or *GetResellerChildsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents for child accounts information per page * @param "Offset" (optional.Int64) - Index of the first document in the page + @return GetChildrenList */ -type ResellerApiGetResellerChildsOpts struct { +type GetResellerChildsOpts struct { Limit optional.Int64 Offset optional.Int64 } -func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOptionals *ResellerApiGetResellerChildsOpts) (GetChildrenList, *http.Response, error) { +func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOptionals *GetResellerChildsOpts) (GetChildrenList, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1374,7 +1431,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1445,6 +1502,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetChildrenList err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1455,6 +1513,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1465,6 +1524,7 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1475,7 +1535,8 @@ func (a *ResellerApiService) GetResellerChilds(ctx context.Context, localVarOpti ResellerApiService Get session token to access Sendinblue (SSO) It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token] * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + @return GetSsoToken */ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier string) (GetSsoToken, *http.Response, error) { @@ -1496,7 +1557,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1567,6 +1628,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSsoToken err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1577,6 +1639,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1587,6 +1650,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1597,6 +1661,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1607,6 +1672,7 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1616,11 +1682,12 @@ func (a *ResellerApiService) GetSsoToken(ctx context.Context, childIdentifier st /* ResellerApiService Remove Email and/or SMS credits from a specific child account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to post to remove email or SMS credits from a specific child account - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param removeCredits Values to post to remove email or SMS credits from a specific child account + @return RemainingCreditModel */ -func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredits, childIdentifier string) (RemainingCreditModel, *http.Response, error) { +func (a *ResellerApiService) RemoveCredits(ctx context.Context, childIdentifier string, removeCredits RemoveCredits) (RemainingCreditModel, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -1655,7 +1722,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &removeCredits if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1711,6 +1778,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v RemainingCreditModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1721,6 +1789,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1731,6 +1800,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1741,6 +1811,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1751,6 +1822,7 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi newErr.model = v return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } @@ -1758,13 +1830,14 @@ func (a *ResellerApiService) RemoveCredits(ctx context.Context, body RemoveCredi } /* -ResellerApiService Update info of reseller's child account status based on the childIdentifier supplied +ResellerApiService Update info of reseller's child account status based on the childIdentifier supplied * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body values to update in child account status - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param updateChildAccountStatus values to update in child account status + */ -func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body UpdateChildAccountStatus, childIdentifier string) (*http.Response, error) { +func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, childIdentifier string, updateChildAccountStatus UpdateChildAccountStatus) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -1798,7 +1871,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateChildAccountStatus if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1846,6 +1919,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1856,6 +1930,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1866,6 +1941,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1876,6 +1952,7 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -1883,14 +1960,15 @@ func (a *ResellerApiService) UpdateChildAccountStatus(ctx context.Context, body } /* -ResellerApiService Update the sender domain of reseller's child based on the childIdentifier and domainName passed +ResellerApiService Update the sender domain of reseller's child based on the childIdentifier and domainName passed * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body value to update for sender domain - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child * @param domainName Pass the existing domain that needs to be updated + * @param updateChildDomain value to update for sender domain + */ -func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateChildDomain, childIdentifier string, domainName string) (*http.Response, error) { +func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, childIdentifier string, domainName string, updateChildDomain UpdateChildDomain) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -1925,7 +2003,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateC localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateChildDomain if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1973,6 +2051,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateC body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1983,6 +2062,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateC newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -1993,6 +2073,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateC newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -2003,6 +2084,7 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateC newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } @@ -2010,13 +2092,14 @@ func (a *ResellerApiService) UpdateChildDomain(ctx context.Context, body UpdateC } /* -ResellerApiService Update info of reseller's child based on the child identifier supplied +ResellerApiService Update info of reseller's child based on the child identifier supplied * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body values to update in child profile - * @param childIdentifier Either auth key or id of reseller's child + * @param childIdentifier Either auth key or id of reseller's child + * @param resellerChild values to update in child profile + */ -func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, body UpdateChild, childIdentifier string) (*http.Response, error) { +func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, childIdentifier string, resellerChild UpdateChild) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -2050,7 +2133,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, body Updat localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &resellerChild if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2098,6 +2181,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, body Updat body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -2108,6 +2192,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, body Updat newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 403 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -2118,6 +2203,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, body Updat newErr.model = v return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) @@ -2128,6 +2214,7 @@ func (a *ResellerApiService) UpdateResellerChild(ctx context.Context, body Updat newErr.model = v return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_senders.go b/lib/api_senders.go index 259287c..eae2033 100644 --- a/lib/api_senders.go +++ b/lib/api_senders.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,24 +27,26 @@ var ( ) type SendersApiService service + /* SendersApiService Create a new sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *SendersApiCreateSenderOpts - Optional Parameters: - * @param "Body" (optional.Interface of CreateSender) - sender's name + * @param optional nil or *CreateSenderOpts - Optional Parameters: + * @param "Sender" (optional.Interface of CreateSender) - sender's name + @return CreateSenderModel */ -type SendersApiCreateSenderOpts struct { - Body optional.Interface +type CreateSenderOpts struct { + Sender optional.Interface } -func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals *SendersApiCreateSenderOpts) (CreateSenderModel, *http.Response, error) { +func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals *CreateSenderOpts) (CreateSenderModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSenderModel ) @@ -72,10 +75,13 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody + if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { + + localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(CreateSender) + if !localVarOptionalSenderok { + return localVarReturnValue, nil, reportError("sender should be CreateSender") + } + localVarPostBody = &localVarOptionalSender } if ctx != nil { // API Key Authentication @@ -87,7 +93,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -100,7 +106,7 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -121,47 +127,52 @@ func (a *SendersApiService) CreateSender(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateSenderModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SendersApiService Delete a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender + */ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (*http.Response, error) { var ( @@ -169,7 +180,6 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -181,7 +191,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -207,7 +217,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -220,7 +230,7 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -239,48 +249,52 @@ func (a *SendersApiService) DeleteSender(ctx context.Context, senderId int64) (* return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* SendersApiService Get all the dedicated IPs for your account * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetIps */ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetIps ) @@ -292,7 +306,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -318,7 +332,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -331,7 +345,7 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -352,44 +366,48 @@ func (a *SendersApiService) GetIps(ctx context.Context) (GetIps, *http.Response, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetIps - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SendersApiService Get all the dedicated IPs for a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender + @return GetIpsFromSender */ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64) (GetIpsFromSender, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetIpsFromSender ) @@ -402,7 +420,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -428,7 +446,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -441,7 +459,7 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -462,72 +480,78 @@ func (a *SendersApiService) GetIpsFromSender(ctx context.Context, senderId int64 if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetIpsFromSender - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SendersApiService Get the list of all your senders * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *SendersApiGetSendersOpts - Optional Parameters: + * @param optional nil or *GetSendersOpts - Optional Parameters: * @param "Ip" (optional.String) - Filter your senders for a specific ip (available for dedicated IP usage only) * @param "Domain" (optional.String) - Filter your senders for a specific domain + @return GetSendersList */ -type SendersApiGetSendersOpts struct { - Ip optional.String - Domain optional.String +type GetSendersOpts struct { + Ip optional.String + Domain optional.String } -func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *SendersApiGetSendersOpts) (GetSendersList, *http.Response, error) { +func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *GetSendersOpts) (GetSendersList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSendersList ) @@ -545,7 +569,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *S localVarQueryParams.Add("domain", parameterToString(localVarOptionals.Domain.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -571,7 +595,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *S key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -584,7 +608,7 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *S key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -605,62 +629,66 @@ func (a *SendersApiService) GetSenders(ctx context.Context, localVarOptionals *S if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSendersList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SendersApiService Update a sender * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param senderId Id of the sender - * @param optional nil or *SendersApiUpdateSenderOpts - Optional Parameters: - * @param "Body" (optional.Interface of UpdateSender) - sender's name + * @param optional nil or *UpdateSenderOpts - Optional Parameters: + * @param "Sender" (optional.Interface of UpdateSender) - sender's name + */ -type SendersApiUpdateSenderOpts struct { - Body optional.Interface +type UpdateSenderOpts struct { + Sender optional.Interface } -func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, localVarOptionals *SendersApiUpdateSenderOpts) (*http.Response, error) { +func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, localVarOptionals *UpdateSenderOpts) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -689,10 +717,13 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody + if localVarOptionals != nil && localVarOptionals.Sender.IsSet() { + + localVarOptionalSender, localVarOptionalSenderok := localVarOptionals.Sender.Value().(UpdateSender) + if !localVarOptionalSenderok { + return nil, reportError("sender should be UpdateSender") + } + localVarPostBody = &localVarOptionalSender } if ctx != nil { // API Key Authentication @@ -704,7 +735,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -717,7 +748,7 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -736,32 +767,34 @@ func (a *SendersApiService) UpdateSender(ctx context.Context, senderId int64, lo return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_sms_campaigns.go b/lib/api_sms_campaigns.go index 027e8d2..f3e7408 100644 --- a/lib/api_sms_campaigns.go +++ b/lib/api_sms_campaigns.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,18 +27,20 @@ var ( ) type SMSCampaignsApiService service + /* SMSCampaignsApiService Creates an SMS campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create an SMS Campaign + * @param createSmsCampaign Values to create an SMS Campaign + @return CreateModel */ -func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, body CreateSmsCampaign) (CreateModel, *http.Response, error) { +func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, createSmsCampaign CreateSmsCampaign) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -66,7 +69,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, body Cre localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createSmsCampaign if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -77,7 +80,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, body Cre key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +93,7 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, body Cre key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,47 +114,52 @@ func (a *SMSCampaignsApiService) CreateSmsCampaign(ctx context.Context, body Cre if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SMSCampaignsApiService Delete an SMS campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId id of the SMS campaign + */ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -159,7 +167,6 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -171,7 +178,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -197,7 +204,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -210,7 +217,7 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -229,49 +236,53 @@ func (a *SMSCampaignsApiService) DeleteSmsCampaign(ctx context.Context, campaign return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* SMSCampaignsApiService Get an SMS campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId id of the SMS campaign + @return GetSmsCampaign */ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId int64) (GetSmsCampaign, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsCampaign ) @@ -284,7 +295,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -310,7 +321,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -323,7 +334,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -344,80 +355,86 @@ func (a *SMSCampaignsApiService) GetSmsCampaign(ctx context.Context, campaignId if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSmsCampaign - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SMSCampaignsApiService Returns the information for all your created SMS campaigns * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *SMSCampaignsApiGetSmsCampaignsOpts - Optional Parameters: + * @param optional nil or *GetSmsCampaignsOpts - Optional Parameters: * @param "Status" (optional.String) - Status of campaign. - * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) - * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) + * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) + * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent sms campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) * @param "Limit" (optional.Int64) - Number limitation for the result returned * @param "Offset" (optional.Int64) - Beginning point in the list to retrieve from. * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetSmsCampaigns */ -type SMSCampaignsApiGetSmsCampaignsOpts struct { - Status optional.String - StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetSmsCampaignsOpts struct { + Status optional.String + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOptionals *SMSCampaignsApiGetSmsCampaignsOpts) (GetSmsCampaigns, *http.Response, error) { +func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOptionals *GetSmsCampaignsOpts) (GetSmsCampaigns, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsCampaigns ) @@ -447,7 +464,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -473,7 +490,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -486,7 +503,7 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -507,62 +524,67 @@ func (a *SMSCampaignsApiService) GetSmsCampaigns(ctx context.Context, localVarOp if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSmsCampaigns - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* -SMSCampaignsApiService Export an SMS campaign's recipients +SMSCampaignsApiService Export an SMS campaign's recipients It returns the background process ID which on completion calls the notify URL that you have set in the input. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId id of the campaign - * @param optional nil or *SMSCampaignsApiRequestSmsRecipientExportOpts - Optional Parameters: - * @param "Body" (optional.Interface of RequestSmsRecipientExport) - Values to send for a recipient export request + * @param optional nil or *RequestSmsRecipientExportOpts - Optional Parameters: + * @param "RecipientExport" (optional.Interface of RequestSmsRecipientExport) - Values to send for a recipient export request + @return CreatedProcessId */ -type SMSCampaignsApiRequestSmsRecipientExportOpts struct { - Body optional.Interface +type RequestSmsRecipientExportOpts struct { + RecipientExport optional.Interface } -func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, campaignId int64, localVarOptionals *SMSCampaignsApiRequestSmsRecipientExportOpts) (CreatedProcessId, *http.Response, error) { +func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, campaignId int64, localVarOptionals *RequestSmsRecipientExportOpts) (CreatedProcessId, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreatedProcessId ) @@ -592,10 +614,13 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody + if localVarOptionals != nil && localVarOptionals.RecipientExport.IsSet() { + + localVarOptionalRecipientExport, localVarOptionalRecipientExportok := localVarOptionals.RecipientExport.Value().(RequestSmsRecipientExport) + if !localVarOptionalRecipientExportok { + return localVarReturnValue, nil, reportError("recipientExport should be RequestSmsRecipientExport") + } + localVarPostBody = &localVarOptionalRecipientExport } if ctx != nil { // API Key Authentication @@ -607,7 +632,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -620,7 +645,7 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -641,57 +666,63 @@ func (a *SMSCampaignsApiService) RequestSmsRecipientExport(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 202 { var v CreatedProcessId - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* SMSCampaignsApiService Send your SMS campaign immediately * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param campaignId id of the campaign + */ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaignId int64) (*http.Response, error) { var ( @@ -699,7 +730,6 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -711,7 +741,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -737,7 +767,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -750,7 +780,7 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -769,62 +799,66 @@ func (a *SMSCampaignsApiService) SendSmsCampaignNow(ctx context.Context, campaig return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* -SMSCampaignsApiService Send an SMS campaign's report +SMSCampaignsApiService Send an SMS campaign's report Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values for send a report * @param campaignId id of the campaign + * @param sendReport Values for send a report + */ -func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, body SendReport, campaignId int64) (*http.Response, error) { +func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, campaignId int64, sendReport SendReport) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -853,7 +887,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, body SendRep localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &sendReport if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -864,7 +898,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, body SendRep key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -877,7 +911,7 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, body SendRep key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -896,51 +930,54 @@ func (a *SMSCampaignsApiService) SendSmsReport(ctx context.Context, body SendRep return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* SMSCampaignsApiService Send a test SMS campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted * @param campaignId Id of the SMS campaign + * @param phoneNumber Mobile number of the recipient with the country code. This number must belong to one of your contacts in SendinBlue account and must not be blacklisted + */ -func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, body SendTestSms, campaignId int64) (*http.Response, error) { +func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, campaignId int64, phoneNumber SendTestSms) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -969,7 +1006,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, body SendTestS localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &phoneNumber if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -980,7 +1017,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, body SendTestS key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -993,7 +1030,7 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, body SendTestS key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1012,51 +1049,54 @@ func (a *SMSCampaignsApiService) SendTestSms(ctx context.Context, body SendTestS return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v PostSendSmsTestFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* SMSCampaignsApiService Update an SMS campaign * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update an SMS Campaign * @param campaignId id of the SMS campaign + * @param updateSmsCampaign Values to update an SMS Campaign + */ -func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, body UpdateSmsCampaign, campaignId int64) (*http.Response, error) { +func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, campaignId int64, updateSmsCampaign UpdateSmsCampaign) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1085,7 +1125,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, body Upd localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateSmsCampaign if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1096,7 +1136,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, body Upd key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1109,7 +1149,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, body Upd key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1128,51 +1168,54 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaign(ctx context.Context, body Upd return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* -SMSCampaignsApiService Update a campaign's status +SMSCampaignsApiService Update a campaign's status * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Status of the campaign. * @param campaignId id of the campaign + * @param status Status of the campaign. + */ -func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, body UpdateCampaignStatus, campaignId int64) (*http.Response, error) { +func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, campaignId int64, status UpdateCampaignStatus) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -1201,7 +1244,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, bo localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &status if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -1212,7 +1255,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, bo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1225,7 +1268,7 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, bo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1244,32 +1287,34 @@ func (a *SMSCampaignsApiService) UpdateSmsCampaignStatus(ctx context.Context, bo return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_transactional_emails.go b/lib/api_transactional_emails.go index 9be00cb..49bebc8 100644 --- a/lib/api_transactional_emails.go +++ b/lib/api_transactional_emails.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,20 +27,21 @@ var ( ) type TransactionalEmailsApiService service + /* TransactionalEmailsApiService Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body + * @param blockDomain + */ -func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, body BlockDomain) (*http.Response, error) { +func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, blockDomain BlockDomain) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -67,7 +69,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, body localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &blockDomain if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -78,7 +80,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, body key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -91,7 +93,7 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, body key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -110,39 +112,42 @@ func (a *TransactionalEmailsApiService) BlockNewDomain(ctx context.Context, body return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Create an email template * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body values to update in transactional email template + * @param smtpTemplate values to update in transactional email template + @return CreateModel */ -func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, body CreateSmtpTemplate) (CreateModel, *http.Response, error) { +func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, smtpTemplate CreateSmtpTemplate) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -171,7 +176,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &smtpTemplate if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -182,7 +187,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -195,7 +200,7 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -216,48 +221,53 @@ func (a *TransactionalEmailsApiService) CreateSmtpTemplate(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param domain The name of the domain to be deleted + */ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, domain string) (*http.Response, error) { var ( @@ -265,7 +275,6 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -277,7 +286,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -303,7 +312,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -316,7 +325,7 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -335,47 +344,49 @@ func (a *TransactionalEmailsApiService) DeleteBlockedDomain(ctx context.Context, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiDeleteHardbouncesOpts - Optional Parameters: - * @param "Body" (optional.Interface of DeleteHardbounces) - values to delete hardbounces + * @param optional nil or *DeleteHardbouncesOpts - Optional Parameters: + * @param "DeleteHardbounces" (optional.Interface of DeleteHardbounces) - values to delete hardbounces + */ -type TransactionalEmailsApiDeleteHardbouncesOpts struct { - Body optional.Interface +type DeleteHardbouncesOpts struct { + DeleteHardbounces optional.Interface } -func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, localVarOptionals *TransactionalEmailsApiDeleteHardbouncesOpts) (*http.Response, error) { +func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, localVarOptionals *DeleteHardbouncesOpts) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -403,10 +414,13 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - - localVarOptionalBody:= localVarOptionals.Body.Value() - localVarPostBody = &localVarOptionalBody + if localVarOptionals != nil && localVarOptionals.DeleteHardbounces.IsSet() { + + localVarOptionalDeleteHardbounces, localVarOptionalDeleteHardbouncesok := localVarOptionals.DeleteHardbounces.Value().(DeleteHardbounces) + if !localVarOptionalDeleteHardbouncesok { + return nil, reportError("deleteHardbounces should be DeleteHardbounces") + } + localVarPostBody = &localVarOptionalDeleteHardbounces } if ctx != nil { // API Key Authentication @@ -418,7 +432,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -431,7 +445,7 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -450,32 +464,152 @@ func (a *TransactionalEmailsApiService) DeleteHardbounces(ctx context.Context, l return localVarHttpResponse, err } + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +TransactionalEmailsApiService Delete scheduled emails by batchId or messageId +Delete scheduled batch of emails by batchId or single scheduled email by messageId + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + + +*/ +func (a *TransactionalEmailsApiService) DeleteScheduledEmailById(ctx context.Context, identifier string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/smtp/email/{identifier}" + localVarPath = strings.Replace(localVarPath, "{"+"identifier"+"}", fmt.Sprintf("%v", identifier), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr + } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Delete an inactive email template * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param templateId id of the template + */ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, templateId int64) (*http.Response, error) { var ( @@ -483,7 +617,6 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -495,7 +628,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -521,7 +654,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -534,7 +667,7 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -553,61 +686,66 @@ func (a *TransactionalEmailsApiService) DeleteSmtpTemplate(ctx context.Context, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get your transactional email activity aggregated over a period of time +This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiGetAggregatedSmtpReportOpts - Optional Parameters: + * @param optional nil or *GetAggregatedSmtpReportOpts - Optional Parameters: * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' * @param "Tag" (optional.String) - Tag of the emails + @return GetAggregatedReport */ -type TransactionalEmailsApiGetAggregatedSmtpReportOpts struct { - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String +type GetAggregatedSmtpReportOpts struct { + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String } -func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Context, localVarOptionals *TransactionalEmailsApiGetAggregatedSmtpReportOpts) (GetAggregatedReport, *http.Response, error) { +func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Context, localVarOptionals *GetAggregatedSmtpReportOpts) (GetAggregatedReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetAggregatedReport ) @@ -631,7 +769,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont localVarQueryParams.Add("tag", parameterToString(localVarOptionals.Tag.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -657,7 +795,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -670,7 +808,7 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -691,54 +829,59 @@ func (a *TransactionalEmailsApiService) GetAggregatedSmtpReport(ctx context.Cont if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetAggregatedReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get the list of blocked domains Get the list of blocked domains * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return GetBlockedDomains */ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) (GetBlockedDomains, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetBlockedDomains ) @@ -750,7 +893,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -776,7 +919,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -789,7 +932,7 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -810,70 +953,75 @@ func (a *TransactionalEmailsApiService) GetBlockedDomains(ctx context.Context) ( if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetBlockedDomains - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get all your transactional email activity (unaggregated events) +This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiGetEmailEventReportOpts - Optional Parameters: + * @param optional nil or *GetEmailEventReportOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number limitation for the result returned * @param "Offset" (optional.Int64) - Beginning point in the list to retrieve from. * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' * @param "Email" (optional.String) - Filter the report for a specific email addresses * @param "Event" (optional.String) - Filter the report for a specific event type * @param "Tags" (optional.String) - Filter the report for tags (serialized and urlencoded array) * @param "MessageId" (optional.String) - Filter on a specific message id * @param "TemplateId" (optional.Int64) - Filter on a specific template id * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetEmailEventReport */ -type TransactionalEmailsApiGetEmailEventReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Email optional.String - Event optional.String - Tags optional.String - MessageId optional.String - TemplateId optional.Int64 - Sort optional.String +type GetEmailEventReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Email optional.String + Event optional.String + Tags optional.String + MessageId optional.String + TemplateId optional.Int64 + Sort optional.String } -func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarOptionals *TransactionalEmailsApiGetEmailEventReportOpts) (GetEmailEventReport, *http.Response, error) { +func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarOptionals *GetEmailEventReportOpts) (GetEmailEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetEmailEventReport ) @@ -918,7 +1066,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -944,7 +1092,320 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetEmailEventReport + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +TransactionalEmailsApiService Fetch scheduled emails by batchId +Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) + * @param optional nil or *GetScheduledEmailByBatchIdOpts - Optional Parameters: + * @param "StartDate" (optional.String) - Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + * @param "EndDate" (optional.String) - Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @param "Status" (optional.String) - Filter the records by `status` of the scheduled email batch or message. + * @param "Limit" (optional.Int64) - Number of documents returned per page + * @param "Offset" (optional.Int64) - Index of the first document on the page + +@return GetScheduledEmailByBatchId +*/ + +type GetScheduledEmailByBatchIdOpts struct { + StartDate optional.String + EndDate optional.String + Sort optional.String + Status optional.String + Limit optional.Int64 + Offset optional.Int64 +} + +func (a *TransactionalEmailsApiService) GetScheduledEmailByBatchId(ctx context.Context, batchId string, localVarOptionals *GetScheduledEmailByBatchIdOpts) (GetScheduledEmailByBatchId, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetScheduledEmailByBatchId + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/smtp/emailStatus/{batchId}" + localVarPath = strings.Replace(localVarPath, "{"+"batchId"+"}", fmt.Sprintf("%v", batchId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.StartDate.IsSet() { + localVarQueryParams.Add("startDate", parameterToString(localVarOptionals.StartDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndDate.IsSet() { + localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Status.IsSet() { + localVarQueryParams.Add("status", parameterToString(localVarOptionals.Status.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + + } + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["partner-key"] = key + + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v GetScheduledEmailByBatchId + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 400 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +TransactionalEmailsApiService Fetch scheduled email by messageId +Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param messageId The messageId of scheduled email + * @param optional nil or *GetScheduledEmailByMessageIdOpts - Optional Parameters: + * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. + * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. + +@return GetScheduledEmailByMessageId +*/ + +type GetScheduledEmailByMessageIdOpts struct { + StartDate optional.String + EndDate optional.String +} + +func (a *TransactionalEmailsApiService) GetScheduledEmailByMessageId(ctx context.Context, messageId string, localVarOptionals *GetScheduledEmailByMessageIdOpts) (GetScheduledEmailByMessageId, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue GetScheduledEmailByMessageId + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/smtp/emailStatus/{messageId}" + localVarPath = strings.Replace(localVarPath, "{"+"messageId"+"}", fmt.Sprintf("%v", messageId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.StartDate.IsSet() { + localVarQueryParams.Add("startDate", parameterToString(localVarOptionals.StartDate.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.EndDate.IsSet() { + localVarQueryParams.Add("endDate", parameterToString(localVarOptionals.EndDate.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["api-key"] = key + } } if ctx != nil { @@ -957,7 +1418,7 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -978,72 +1439,88 @@ func (a *TransactionalEmailsApiService) GetEmailEventReport(ctx context.Context, if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { - var v GetEmailEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + var v GetScheduledEmailByMessageId + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 404 { + var v ErrorModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get your transactional email activity aggregated per day * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiGetSmtpReportOpts - Optional Parameters: + * @param optional nil or *GetSmtpReportOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents returned per page * @param "Offset" (optional.Int64) - Index of the first document on the page * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' * @param "Tag" (optional.String) - Tag of the emails * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetReports */ -type TransactionalEmailsApiGetSmtpReportOpts struct { - Limit optional.Int64 - Offset optional.Int64 - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String - Sort optional.String +type GetSmtpReportOpts struct { + Limit optional.Int64 + Offset optional.Int64 + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String + Sort optional.String } -func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, localVarOptionals *TransactionalEmailsApiGetSmtpReportOpts) (GetReports, *http.Response, error) { +func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, localVarOptionals *GetSmtpReportOpts) (GetReports, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetReports ) @@ -1076,7 +1553,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1102,7 +1579,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1115,7 +1592,7 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1136,54 +1613,59 @@ func (a *TransactionalEmailsApiService) GetSmtpReport(ctx context.Context, local if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetReports - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Returns the template information * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param templateId id of the template + @return GetSmtpTemplateOverview */ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, templateId int64) (GetSmtpTemplateOverview, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmtpTemplateOverview ) @@ -1196,7 +1678,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1222,7 +1704,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1235,7 +1717,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1256,76 +1738,82 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplate(ctx context.Context, tem if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSmtpTemplateOverview - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get the list of email templates * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiGetSmtpTemplatesOpts - Optional Parameters: + * @param optional nil or *GetSmtpTemplatesOpts - Optional Parameters: * @param "TemplateStatus" (optional.Bool) - Filter on the status of the template. Active = true, inactive = false * @param "Limit" (optional.Int64) - Number of documents returned per page * @param "Offset" (optional.Int64) - Index of the first document in the page * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetSmtpTemplates */ -type TransactionalEmailsApiGetSmtpTemplatesOpts struct { - TemplateStatus optional.Bool - Limit optional.Int64 - Offset optional.Int64 - Sort optional.String +type GetSmtpTemplatesOpts struct { + TemplateStatus optional.Bool + Limit optional.Int64 + Offset optional.Int64 + Sort optional.String } -func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, localVarOptionals *TransactionalEmailsApiGetSmtpTemplatesOpts) (GetSmtpTemplates, *http.Response, error) { +func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, localVarOptionals *GetSmtpTemplatesOpts) (GetSmtpTemplates, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmtpTemplates ) @@ -1349,7 +1837,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1375,7 +1863,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1388,7 +1876,7 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1409,70 +1897,75 @@ func (a *TransactionalEmailsApiService) GetSmtpTemplates(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSmtpTemplates - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get the list of blocked or unsubscribed transactional contacts * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiGetTransacBlockedContactsOpts - Optional Parameters: + * @param optional nil or *GetTransacBlockedContactsOpts - Optional Parameters: * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts * @param "Limit" (optional.Int64) - Number of documents returned per page * @param "Offset" (optional.Int64) - Index of the first document on the page * @param "Senders" (optional.Interface of []string) - Comma separated list of emails of the senders from which contacts are blocked or unsubscribed * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetTransacBlockedContacts */ -type TransactionalEmailsApiGetTransacBlockedContactsOpts struct { - StartDate optional.String - EndDate optional.String - Limit optional.Int64 - Offset optional.Int64 - Senders optional.Interface - Sort optional.String +type GetTransacBlockedContactsOpts struct { + StartDate optional.String + EndDate optional.String + Limit optional.Int64 + Offset optional.Int64 + Senders optional.Interface + Sort optional.String } -func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Context, localVarOptionals *TransactionalEmailsApiGetTransacBlockedContactsOpts) (GetTransacBlockedContacts, *http.Response, error) { +func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Context, localVarOptionals *GetTransacBlockedContactsOpts) (GetTransacBlockedContacts, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacBlockedContacts ) @@ -1502,7 +1995,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1528,7 +2021,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1541,7 +2034,7 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1562,54 +2055,59 @@ func (a *TransactionalEmailsApiService) GetTransacBlockedContacts(ctx context.Co if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetTransacBlockedContacts - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get the personalized content of a sent transactional email * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param uuid Unique id of the transactional email that has been sent to a particular contact + @return GetTransacEmailContent */ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Context, uuid string) (GetTransacEmailContent, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacEmailContent ) @@ -1622,7 +2120,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1648,7 +2146,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1661,7 +2159,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1682,61 +2180,69 @@ func (a *TransactionalEmailsApiService) GetTransacEmailContent(ctx context.Conte if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetTransacEmailContent - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Get the list of transactional emails on the basis of allowed filters This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalEmailsApiGetTransacEmailsListOpts - Optional Parameters: + * @param optional nil or *GetTransacEmailsListOpts - Optional Parameters: * @param "Email" (optional.String) - Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. * @param "TemplateId" (optional.Int64) - Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. * @param "MessageId" (optional.String) - Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + * @param "Limit" (optional.Int64) - Number of documents returned per page + * @param "Offset" (optional.Int64) - Index of the first document in the page + @return GetTransacEmailsList */ -type TransactionalEmailsApiGetTransacEmailsListOpts struct { - Email optional.String - TemplateId optional.Int64 - MessageId optional.String - StartDate optional.String - EndDate optional.String - Sort optional.String +type GetTransacEmailsListOpts struct { + Email optional.String + TemplateId optional.Int64 + MessageId optional.String + StartDate optional.String + EndDate optional.String + Sort optional.String + Limit optional.Int64 + Offset optional.Int64 } -func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context, localVarOptionals *TransactionalEmailsApiGetTransacEmailsListOpts) (GetTransacEmailsList, *http.Response, error) { +func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context, localVarOptionals *GetTransacEmailsListOpts) (GetTransacEmailsList, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacEmailsList ) @@ -1765,8 +2271,14 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } + if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { + localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Offset.IsSet() { + localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), "")) + } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -1792,7 +2304,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -1805,7 +2317,7 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -1826,190 +2338,60 @@ func (a *TransactionalEmailsApiService) GetTransacEmailsList(ctx context.Context if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetTransacEmailsList - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 400 { - var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr - } - return localVarReturnValue, localVarHttpResponse, newErr - } - - return localVarReturnValue, localVarHttpResponse, nil -} -/* -TransactionalEmailsApiService Send a template -This endpoint is deprecated. Prefer v3/smtp/email instead. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body - * @param templateId Id of the template -@return SendTemplateEmail -*/ -func (a *TransactionalEmailsApiService) SendTemplate(ctx context.Context, body SendEmail, templateId int64) (SendTemplateEmail, *http.Response, error) { - var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte - localVarReturnValue SendTemplateEmail - ) - - // create path and map variables - localVarPath := a.client.cfg.BasePath + "/smtp/templates/{templateId}/send" - localVarPath = strings.Replace(localVarPath, "{"+"templateId"+"}", fmt.Sprintf("%v", templateId), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType - } - - // to determine the Accept header - localVarHttpHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) - if localVarHttpHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept - } - // body params - localVarPostBody = &body - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["api-key"] = key - - } - } - if ctx != nil { - // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key } - localVarHeaderParams["partner-key"] = key - - } - } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarReturnValue, localVarHttpResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHttpResponse, err - } - - if localVarHttpResponse.StatusCode < 300 { - // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { - return localVarReturnValue, localVarHttpResponse, err + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } - } - if localVarHttpResponse.StatusCode >= 300 { - newErr := GenericSwaggerError{ - body: localVarBody, - error: localVarHttpResponse.Status, - } - if localVarHttpResponse.StatusCode == 201 { - var v SendTemplateEmail - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } if localVarHttpResponse.StatusCode == 400 { - var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHttpResponse, newErr - } - if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Send a template to your test list * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body * @param templateId Id of the template + * @param sendTestEmail + */ -func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, body SendTestEmail, templateId int64) (*http.Response, error) { +func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, templateId int64, sendTestEmail SendTestEmail) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2038,7 +2420,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, bo localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &sendTestEmail if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2049,7 +2431,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, bo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2062,7 +2444,7 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, bo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2081,49 +2463,53 @@ func (a *TransactionalEmailsApiService) SendTestTemplate(ctx context.Context, bo return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v PostSendFailed - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Send a transactional email * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to send a transactional email + * @param sendSmtpEmail Values to send a transactional email + @return CreateSmtpEmail */ -func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, body SendSmtpEmail) (CreateSmtpEmail, *http.Response, error) { +func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, sendSmtpEmail SendSmtpEmail) (CreateSmtpEmail, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateSmtpEmail ) @@ -2152,7 +2538,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, bo localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &sendSmtpEmail if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2163,7 +2549,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, bo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2176,7 +2562,7 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, bo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2197,47 +2583,63 @@ func (a *TransactionalEmailsApiService) SendTransacEmail(ctx context.Context, bo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateSmtpEmail - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + if localVarHttpResponse.StatusCode == 202 { + var v ScheduleSmtpEmail + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalEmailsApiService Unblock or resubscribe a transactional contact * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param email contact email (urlencoded) to unblock. + */ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx context.Context, email string) (*http.Response, error) { var ( @@ -2245,7 +2647,6 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2257,7 +2658,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -2283,7 +2684,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2296,7 +2697,7 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2315,42 +2716,46 @@ func (a *TransactionalEmailsApiService) SmtpBlockedContactsEmailDelete(ctx conte return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Delete an SMTP transactional log * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param messageId MessageId of the transactional log to delete + */ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Context, messageId string) (*http.Response, error) { var ( @@ -2358,7 +2763,6 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2370,7 +2774,7 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -2396,7 +2800,7 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2409,7 +2813,7 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2428,51 +2832,54 @@ func (a *TransactionalEmailsApiService) SmtpLogMessageIdDelete(ctx context.Conte return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* TransactionalEmailsApiService Update an email template * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body values to update in transactional email template * @param templateId id of the template + * @param smtpTemplate values to update in transactional email template + */ -func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, body UpdateSmtpTemplate, templateId int64) (*http.Response, error) { +func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, templateId int64, smtpTemplate UpdateSmtpTemplate) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -2501,7 +2908,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &smtpTemplate if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -2512,7 +2919,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -2525,7 +2932,7 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -2544,32 +2951,34 @@ func (a *TransactionalEmailsApiService) UpdateSmtpTemplate(ctx context.Context, return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/api_transactional_sms.go b/lib/api_transactional_sms.go index cc20ce1..3196d20 100644 --- a/lib/api_transactional_sms.go +++ b/lib/api_transactional_sms.go @@ -1,13 +1,13 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( @@ -16,6 +16,7 @@ import ( "net/http" "net/url" "strings" + "github.com/antihax/optional" ) @@ -25,40 +26,42 @@ var ( ) type TransactionalSMSApiService service + /* TransactionalSMSApiService Get all your SMS activity (unaggregated events) * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalSMSApiGetSmsEventsOpts - Optional Parameters: + * @param optional nil or *GetSmsEventsOpts - Optional Parameters: * @param "Limit" (optional.Int64) - Number of documents per page * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report * @param "Offset" (optional.Int64) - Index of the first document of the page - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' * @param "PhoneNumber" (optional.String) - Filter the report for a specific phone number * @param "Event" (optional.String) - Filter the report for specific events * @param "Tags" (optional.String) - Filter the report for specific tags passed as a serialized urlencoded array * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetSmsEventReport */ -type TransactionalSMSApiGetSmsEventsOpts struct { - Limit optional.Int64 - StartDate optional.String - EndDate optional.String - Offset optional.Int64 - Days optional.Int64 - PhoneNumber optional.String - Event optional.String - Tags optional.String - Sort optional.String +type GetSmsEventsOpts struct { + Limit optional.Int64 + StartDate optional.String + EndDate optional.String + Offset optional.Int64 + Days optional.Int64 + PhoneNumber optional.String + Event optional.String + Tags optional.String + Sort optional.String } -func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarOptionals *TransactionalSMSApiGetSmsEventsOpts) (GetSmsEventReport, *http.Response, error) { +func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarOptionals *GetSmsEventsOpts) (GetSmsEventReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetSmsEventReport ) @@ -97,7 +100,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -123,7 +126,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -136,7 +139,7 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -157,66 +160,71 @@ func (a *TransactionalSMSApiService) GetSmsEvents(ctx context.Context, localVarO if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetSmsEventReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalSMSApiService Get your SMS activity aggregated over a period of time * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalSMSApiGetTransacAggregatedSmsReportOpts - Optional Parameters: + * @param optional nil or *GetTransacAggregatedSmsReportOpts - Optional Parameters: * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with startDate and endDate * @param "Tag" (optional.String) - Filter on a tag + @return GetTransacAggregatedSmsReport */ -type TransactionalSMSApiGetTransacAggregatedSmsReportOpts struct { - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String +type GetTransacAggregatedSmsReportOpts struct { + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String } -func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.Context, localVarOptionals *TransactionalSMSApiGetTransacAggregatedSmsReportOpts) (GetTransacAggregatedSmsReport, *http.Response, error) { +func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.Context, localVarOptionals *GetTransacAggregatedSmsReportOpts) (GetTransacAggregatedSmsReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacAggregatedSmsReport ) @@ -240,7 +248,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C localVarQueryParams.Add("tag", parameterToString(localVarOptionals.Tag.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -266,7 +274,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -279,7 +287,7 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -300,68 +308,73 @@ func (a *TransactionalSMSApiService) GetTransacAggregatedSmsReport(ctx context.C if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetTransacAggregatedSmsReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalSMSApiService Get your SMS activity aggregated per day * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TransactionalSMSApiGetTransacSmsReportOpts - Optional Parameters: + * @param optional nil or *GetTransacSmsReportOpts - Optional Parameters: * @param "StartDate" (optional.String) - Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report * @param "EndDate" (optional.String) - Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report - * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' + * @param "Days" (optional.Int64) - Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' * @param "Tag" (optional.String) - Filter on a tag * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed + @return GetTransacSmsReport */ -type TransactionalSMSApiGetTransacSmsReportOpts struct { - StartDate optional.String - EndDate optional.String - Days optional.Int64 - Tag optional.String - Sort optional.String +type GetTransacSmsReportOpts struct { + StartDate optional.String + EndDate optional.String + Days optional.Int64 + Tag optional.String + Sort optional.String } -func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, localVarOptionals *TransactionalSMSApiGetTransacSmsReportOpts) (GetTransacSmsReport, *http.Response, error) { +func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, localVarOptionals *GetTransacSmsReportOpts) (GetTransacSmsReport, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetTransacSmsReport ) @@ -388,7 +401,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -414,7 +427,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -427,7 +440,7 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -448,54 +461,59 @@ func (a *TransactionalSMSApiService) GetTransacSmsReport(ctx context.Context, lo if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetTransacSmsReport - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* TransactionalSMSApiService Send SMS message to a mobile number * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to send a transactional SMS + * @param sendTransacSms Values to send a transactional SMS + @return SendSms */ -func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, body SendTransacSms) (SendSms, *http.Response, error) { +func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, sendTransacSms SendTransacSms) (SendSms, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue SendSms ) @@ -524,7 +542,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, body Se localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &sendTransacSms if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -535,7 +553,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, body Se key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -548,7 +566,7 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, body Se key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -569,47 +587,51 @@ func (a *TransactionalSMSApiService) SendTransacSms(ctx context.Context, body Se if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v SendSms - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 402 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } diff --git a/lib/api_webhooks.go b/lib/api_webhooks.go index cbfed6b..e19470e 100644 --- a/lib/api_webhooks.go +++ b/lib/api_webhooks.go @@ -1,22 +1,23 @@ - /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( "context" + "fmt" "io/ioutil" "net/http" "net/url" "strings" - "fmt" + "github.com/antihax/optional" ) @@ -26,18 +27,20 @@ var ( ) type WebhooksApiService service + /* WebhooksApiService Create a webhook * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to create a webhook + * @param createWebhook Values to create a webhook + @return CreateModel */ -func (a *WebhooksApiService) CreateWebhook(ctx context.Context, body CreateWebhook) (CreateModel, *http.Response, error) { +func (a *WebhooksApiService) CreateWebhook(ctx context.Context, createWebhook CreateWebhook) (CreateModel, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue CreateModel ) @@ -66,7 +69,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, body CreateWebho localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &createWebhook if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -77,7 +80,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, body CreateWebho key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -90,7 +93,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, body CreateWebho key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -111,47 +114,52 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context, body CreateWebho if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 201 { var v CreateModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* WebhooksApiService Delete a webhook * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param webhookId Id of the webhook + */ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) (*http.Response, error) { var ( @@ -159,7 +167,6 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -171,7 +178,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -197,7 +204,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -210,7 +217,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -229,49 +236,53 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, webhookId int64) return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } return localVarHttpResponse, nil } + /* WebhooksApiService Get a webhook details * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param webhookId Id of the webhook + @return GetWebhook */ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (GetWebhook, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWebhook ) @@ -284,7 +295,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G localVarFormParams := url.Values{} // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -310,7 +321,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -323,7 +334,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -344,70 +355,78 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, webhookId int64) (G if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetWebhook - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* WebhooksApiService Get all webhooks * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *WebhooksApiGetWebhooksOpts - Optional Parameters: + * @param optional nil or *GetWebhooksOpts - Optional Parameters: * @param "Type_" (optional.String) - Filter on webhook type + * @param "Sort" (optional.String) - Sort the results in the ascending/descending order of webhook creation + @return GetWebhooks */ -type WebhooksApiGetWebhooksOpts struct { - Type_ optional.String +type GetWebhooksOpts struct { + Type_ optional.String + Sort optional.String } -func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals *WebhooksApiGetWebhooksOpts) (GetWebhooks, *http.Response, error) { +func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals *GetWebhooksOpts) (GetWebhooks, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") - localVarPostBody interface{} - localVarFileName string - localVarFileBytes []byte + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte localVarReturnValue GetWebhooks ) @@ -421,8 +440,11 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals if localVarOptionals != nil && localVarOptionals.Type_.IsSet() { localVarQueryParams.Add("type", parameterToString(localVarOptionals.Type_.Value(), "")) } + if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { + localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) + } // to determine the Content-Type header - localVarHttpContentTypes := []string{} + localVarHttpContentTypes := []string{"application/json"} // set Content-Type header localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) @@ -448,7 +470,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -461,7 +483,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -482,56 +504,60 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context, localVarOptionals if localVarHttpResponse.StatusCode < 300 { // If we succeed, return the data, otherwise pass on to decode error. - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err == nil { + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err == nil { return localVarReturnValue, localVarHttpResponse, err } } if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 200 { var v GetWebhooks - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr } + return localVarReturnValue, localVarHttpResponse, newErr } return localVarReturnValue, localVarHttpResponse, nil } + /* WebhooksApiService Update a webhook * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Values to update a webhook * @param webhookId Id of the webhook + * @param updateWebhook Values to update a webhook + */ -func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body UpdateWebhook, webhookId int64) (*http.Response, error) { +func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, webhookId int64, updateWebhook UpdateWebhook) (*http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - ) // create path and map variables @@ -560,7 +586,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body UpdateWebho localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } // body params - localVarPostBody = &body + localVarPostBody = &updateWebhook if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -571,7 +597,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body UpdateWebho key = auth.Key } localVarHeaderParams["api-key"] = key - + } } if ctx != nil { @@ -584,7 +610,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body UpdateWebho key = auth.Key } localVarHeaderParams["partner-key"] = key - + } } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) @@ -603,32 +629,34 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body UpdateWebho return localVarHttpResponse, err } - if localVarHttpResponse.StatusCode >= 300 { newErr := GenericSwaggerError{ - body: localVarBody, + body: localVarBody, error: localVarHttpResponse.Status, } + if localVarHttpResponse.StatusCode == 400 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + if localVarHttpResponse.StatusCode == 404 { var v ErrorModel - err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); - if err != nil { - newErr.error = err.Error() - return localVarHttpResponse, newErr - } - newErr.model = v + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() return localVarHttpResponse, newErr + } + newErr.model = v + return localVarHttpResponse, newErr } + return localVarHttpResponse, newErr } diff --git a/lib/client.go b/lib/client.go index 7dfcbda..fcdb34a 100644 --- a/lib/client.go +++ b/lib/client.go @@ -7,6 +7,7 @@ * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( @@ -49,14 +50,24 @@ type APIClient struct { AttributesApi *AttributesApiService + CRMApi *CRMApiService + + CompaniesApi *CompaniesApiService + ContactsApi *ContactsApiService + DealsApi *DealsApiService + EmailCampaignsApi *EmailCampaignsApiService FoldersApi *FoldersApiService + InboundParsingApi *InboundParsingApiService + ListsApi *ListsApiService + MasterAccountApi *MasterAccountApiService + ProcessApi *ProcessApiService ResellerApi *ResellerApiService @@ -90,10 +101,15 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.AccountApi = (*AccountApiService)(&c.common) c.AttributesApi = (*AttributesApiService)(&c.common) + c.CRMApi = (*CRMApiService)(&c.common) + c.CompaniesApi = (*CompaniesApiService)(&c.common) c.ContactsApi = (*ContactsApiService)(&c.common) + c.DealsApi = (*DealsApiService)(&c.common) c.EmailCampaignsApi = (*EmailCampaignsApiService)(&c.common) c.FoldersApi = (*FoldersApiService)(&c.common) + c.InboundParsingApi = (*InboundParsingApiService)(&c.common) c.ListsApi = (*ListsApiService)(&c.common) + c.MasterAccountApi = (*MasterAccountApiService)(&c.common) c.ProcessApi = (*ProcessApiService)(&c.common) c.ResellerApi = (*ResellerApiService)(&c.common) c.SMSCampaignsApi = (*SMSCampaignsApiService)(&c.common) @@ -217,7 +233,7 @@ func (c *APIClient) prepareRequest( } // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -256,16 +272,6 @@ func (c *APIClient) prepareRequest( w.Close() } - if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { - if body != nil { - return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") - } - body = &bytes.Buffer{} - body.WriteString(formParams.Encode()) - // Set Content-Length - headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) - } - // Setup path and query parameters url, err := url.Parse(path) if err != nil { diff --git a/lib/configuration.go b/lib/configuration.go index b397cc7..9297144 100644 --- a/lib/configuration.go +++ b/lib/configuration.go @@ -7,6 +7,7 @@ * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import ( @@ -62,7 +63,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "https://api.sendinblue.com/v3", DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/1.0.0/go", + UserAgent: "Swagger-Codegen/2.0.1/go", } return cfg } diff --git a/lib/model_ab_test_campaign_result.go b/lib/model_ab_test_campaign_result.go index c1c03ab..131b9b5 100644 --- a/lib/model_ab_test_campaign_result.go +++ b/lib/model_ab_test_campaign_result.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AbTestCampaignResult struct { @@ -21,7 +22,7 @@ type AbTestCampaignResult struct { // Click rate for current winning version ClickRate string `json:"clickRate,omitempty"` // Open/Click rate for the winner version - WinningVersionRate string `json:"winningVersionRate,omitempty"` - Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"` - ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"` + WinningVersionRate string `json:"winningVersionRate,omitempty"` + Statistics *AbTestCampaignResultStatistics `json:"statistics,omitempty"` + ClickedLinks *AbTestCampaignResultClickedLinks `json:"clickedLinks,omitempty"` } diff --git a/lib/model_ab_test_campaign_result_clicked_links.go b/lib/model_ab_test_campaign_result_clicked_links.go index 6ca2dbe..3d0091f 100644 --- a/lib/model_ab_test_campaign_result_clicked_links.go +++ b/lib/model_ab_test_campaign_result_clicked_links.go @@ -1,15 +1,16 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AbTestCampaignResultClickedLinks struct { - VersionA *[]AbTestVersionClicksInner `json:"Version A"` - VersionB *[]AbTestVersionClicksInner `json:"Version B"` + VersionA *AbTestVersionClicks `json:"Version A"` + VersionB *AbTestVersionClicks `json:"Version B"` } diff --git a/lib/model_ab_test_campaign_result_statistics.go b/lib/model_ab_test_campaign_result_statistics.go index d34cba3..f5e4c78 100644 --- a/lib/model_ab_test_campaign_result_statistics.go +++ b/lib/model_ab_test_campaign_result_statistics.go @@ -1,19 +1,20 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AbTestCampaignResultStatistics struct { - Openers *AbTestVersionStats `json:"openers"` - Clicks *AbTestVersionStats `json:"clicks"` + Openers *AbTestVersionStats `json:"openers"` + Clicks *AbTestVersionStats `json:"clicks"` Unsubscribed *AbTestVersionStats `json:"unsubscribed"` - HardBounces *AbTestVersionStats `json:"hardBounces"` - SoftBounces *AbTestVersionStats `json:"softBounces"` - Complaints *AbTestVersionStats `json:"complaints"` + HardBounces *AbTestVersionStats `json:"hardBounces"` + SoftBounces *AbTestVersionStats `json:"softBounces"` + Complaints *AbTestVersionStats `json:"complaints"` } diff --git a/lib/model_send_template_email.go b/lib/model_ab_test_version_clicks.go similarity index 89% rename from lib/model_send_template_email.go rename to lib/model_ab_test_version_clicks.go index 7d5d230..cb2c7ed 100644 --- a/lib/model_send_template_email.go +++ b/lib/model_ab_test_version_clicks.go @@ -1,15 +1,15 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type SendTemplateEmail struct { - // Message ID of the template Email sent - MessageId string `json:"messageId"` +// Information on clicked links for a particular version +type AbTestVersionClicks struct { } diff --git a/lib/model_ab_test_version_clicks_inner.go b/lib/model_ab_test_version_clicks_inner.go index a9270e7..26d6728 100644 --- a/lib/model_ab_test_version_clicks_inner.go +++ b/lib/model_ab_test_version_clicks_inner.go @@ -1,19 +1,20 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AbTestVersionClicksInner struct { // URL of the link Link string `json:"link"` // Number of times a link is clicked - ClicksCount float64 `json:"clicksCount"` + ClicksCount float32 `json:"clicksCount"` // Percentage of clicks of link with respect to total clicks ClickRate string `json:"clickRate"` } diff --git a/lib/model_ab_test_version_stats.go b/lib/model_ab_test_version_stats.go index 7152656..cbb302e 100644 --- a/lib/model_ab_test_version_stats.go +++ b/lib/model_ab_test_version_stats.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Percentage of a particular event for both versions diff --git a/lib/model_add_child_domain.go b/lib/model_add_child_domain.go index afc695c..41d1c61 100644 --- a/lib/model_add_child_domain.go +++ b/lib/model_add_child_domain.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AddChildDomain struct { diff --git a/lib/model_add_contact_to_list.go b/lib/model_add_contact_to_list.go index 20fcab2..14efa1d 100644 --- a/lib/model_add_contact_to_list.go +++ b/lib/model_add_contact_to_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AddContactToList struct { diff --git a/lib/model_add_credits.go b/lib/model_add_credits.go index c6db0eb..f28348f 100644 --- a/lib/model_add_credits.go +++ b/lib/model_add_credits.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type AddCredits struct { diff --git a/lib/model_all_ofget_contacts_contacts_items.go b/lib/model_all_ofget_contacts_contacts_items.go deleted file mode 100644 index 1c0e350..0000000 --- a/lib/model_all_ofget_contacts_contacts_items.go +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SendinBlue API - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * API version: 3.0.0 - * Contact: contact@sendinblue.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package lib - -type AllOfgetContactsContactsItems struct { - // Email address of the contact for which you requested the details - Email string `json:"email"` - // ID of the contact for which you requested the details - Id int64 `json:"id"` - // Blacklist status for email campaigns (true=blacklisted, false=not blacklisted) - EmailBlacklisted bool `json:"emailBlacklisted"` - // Blacklist status for SMS campaigns (true=blacklisted, false=not blacklisted) - SmsBlacklisted bool `json:"smsBlacklisted"` - // Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` - // Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - ListIds []int64 `json:"listIds"` - ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"` - // Set of attributes of the contact - Attributes *interface{} `json:"attributes"` -} diff --git a/lib/model_all_ofget_email_campaigns_campaigns_items.go b/lib/model_all_ofget_email_campaigns_campaigns_items.go deleted file mode 100644 index 0aa9018..0000000 --- a/lib/model_all_ofget_email_campaigns_campaigns_items.go +++ /dev/null @@ -1,46 +0,0 @@ -/* - * SendinBlue API - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * API version: 3.0.0 - * Contact: contact@sendinblue.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package lib - -type AllOfgetEmailCampaignsCampaignsItems struct { - // Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) - TestSent bool `json:"testSent"` - // Header of the campaign - Header string `json:"header"` - // Footer of the campaign - Footer string `json:"footer"` - Sender *GetExtendedCampaignOverviewSender `json:"sender"` - // Email defined as the \"Reply to\" of the campaign - ReplyTo string `json:"replyTo"` - // Customisation of the \"to\" field of the campaign - ToField string `json:"toField,omitempty"` - // HTML content of the campaign - HtmlContent string `json:"htmlContent"` - // Link to share the campaign on social medias - ShareLink string `json:"shareLink,omitempty"` - // Tag of the campaign - Tag string `json:"tag,omitempty"` - // Creation UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` - // UTC date-time of last modification of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - // Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. - InlineImageActivation bool `json:"inlineImageActivation,omitempty"` - // Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign - MirrorActive bool `json:"mirrorActive,omitempty"` - // FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times - Recurring bool `json:"recurring,omitempty"` - // Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' - SentDate string `json:"sentDate,omitempty"` - // Total number of non-delivered campaigns for a particular campaign id. - ReturnBounce int64 `json:"returnBounce,omitempty"` - Recipients *interface{} `json:"recipients"` - Statistics *interface{} `json:"statistics"` -} diff --git a/lib/model_all_ofget_extended_campaign_stats_campaign_stats_items.go b/lib/model_all_ofget_extended_campaign_stats_campaign_stats_items.go deleted file mode 100644 index 0de4d06..0000000 --- a/lib/model_all_ofget_extended_campaign_stats_campaign_stats_items.go +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SendinBlue API - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * API version: 3.0.0 - * Contact: contact@sendinblue.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package lib - -type AllOfgetExtendedCampaignStatsCampaignStatsItems struct { - // List Id of email campaign (only in case of get email campaign(s)(not for global stats)) - ListId int64 `json:"listId,omitempty"` - // Number of unique clicks for the campaign - UniqueClicks int64 `json:"uniqueClicks"` - // Number of total clicks for the campaign - Clickers int64 `json:"clickers"` - // Number of complaints (Spam reports) for the campaign - Complaints int64 `json:"complaints"` - // Number of delivered emails for the campaign - Delivered int64 `json:"delivered"` - // Number of sent emails for the campaign - Sent int64 `json:"sent"` - // Number of softbounce for the campaign - SoftBounces int64 `json:"softBounces"` - // Number of harbounce for the campaign - HardBounces int64 `json:"hardBounces"` - // Number of unique openings for the campaign - UniqueViews int64 `json:"uniqueViews"` - // Number of unsubscription for the campaign - Unsubscriptions int64 `json:"unsubscriptions"` - // Number of openings for the campaign - Viewed int64 `json:"viewed"` - // Number of deferred emails for the campaign - Deferred int64 `json:"deferred,omitempty"` - // Total number of non-delivered campaigns for a particular campaign id. - ReturnBounce int64 `json:"returnBounce,omitempty"` -} diff --git a/lib/model_all_ofget_extended_campaign_stats_global_stats.go b/lib/model_all_ofget_extended_campaign_stats_global_stats.go deleted file mode 100644 index 533872a..0000000 --- a/lib/model_all_ofget_extended_campaign_stats_global_stats.go +++ /dev/null @@ -1,40 +0,0 @@ -/* - * SendinBlue API - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * API version: 3.0.0 - * Contact: contact@sendinblue.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package lib - -// Overall statistics of the campaign -type AllOfgetExtendedCampaignStatsGlobalStats struct { - // List Id of email campaign (only in case of get email campaign(s)(not for global stats)) - ListId int64 `json:"listId,omitempty"` - // Number of unique clicks for the campaign - UniqueClicks int64 `json:"uniqueClicks"` - // Number of total clicks for the campaign - Clickers int64 `json:"clickers"` - // Number of complaints (Spam reports) for the campaign - Complaints int64 `json:"complaints"` - // Number of delivered emails for the campaign - Delivered int64 `json:"delivered"` - // Number of sent emails for the campaign - Sent int64 `json:"sent"` - // Number of softbounce for the campaign - SoftBounces int64 `json:"softBounces"` - // Number of harbounce for the campaign - HardBounces int64 `json:"hardBounces"` - // Number of unique openings for the campaign - UniqueViews int64 `json:"uniqueViews"` - // Number of unsubscription for the campaign - Unsubscriptions int64 `json:"unsubscriptions"` - // Number of openings for the campaign - Viewed int64 `json:"viewed"` - // Number of deferred emails for the campaign - Deferred int64 `json:"deferred,omitempty"` - // Total number of non-delivered campaigns for a particular campaign id. - ReturnBounce int64 `json:"returnBounce,omitempty"` -} diff --git a/lib/model_all_ofget_webhooks_webhooks_items.go b/lib/model_all_ofget_webhooks_webhooks_items.go deleted file mode 100644 index 42be55d..0000000 --- a/lib/model_all_ofget_webhooks_webhooks_items.go +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SendinBlue API - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * API version: 3.0.0 - * Contact: contact@sendinblue.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package lib - -type AllOfgetWebhooksWebhooksItems struct { - // URL of the webhook - Url string `json:"url"` - // ID of the webhook - Id int64 `json:"id"` - // Description of the webhook - Description string `json:"description"` - Events []string `json:"events"` - // Type of webhook (marketing or transac) - Type_ string `json:"type"` - // Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` - // Last modification UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` -} diff --git a/lib/model_block_domain.go b/lib/model_block_domain.go index c1a18f6..ff84cd5 100644 --- a/lib/model_block_domain.go +++ b/lib/model_block_domain.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type BlockDomain struct { diff --git a/lib/model_send_email_attachment.go b/lib/model_body.go similarity index 84% rename from lib/model_send_email_attachment.go rename to lib/model_body.go index 2fc292c..1bb4f5f 100644 --- a/lib/model_send_email_attachment.go +++ b/lib/model_body.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type SendEmailAttachment struct { - // Base64 encoded chunk data of the attachment generated on the fly - Content string `json:"content"` - // Required for content. Name of the attachment +type Body struct { + // Name of deal Name string `json:"name"` + // Attributes fo\\r deal creation + Attributes map[string]interface{} `json:"attributes,omitempty"` } diff --git a/lib/model_body_1.go b/lib/model_body_1.go new file mode 100644 index 0000000..96e7319 --- /dev/null +++ b/lib/model_body_1.go @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type Body1 struct { + // Name of deal + Name string `json:"name,omitempty"` + // Attributes for deal update + Attributes map[string]interface{} `json:"attributes,omitempty"` +} diff --git a/lib/model_all_ofget_folder_lists_lists_items.go b/lib/model_body_2.go similarity index 77% rename from lib/model_all_ofget_folder_lists_lists_items.go rename to lib/model_body_2.go index 6f040fc..ae10f50 100644 --- a/lib/model_all_ofget_folder_lists_lists_items.go +++ b/lib/model_body_2.go @@ -1,21 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type AllOfgetFolderListsListsItems struct { - // ID of the list - Id int64 `json:"id"` - // Name of the list +type Body2 struct { + // Name of company Name string `json:"name"` - // Number of blacklisted contacts in the list - TotalBlacklisted int64 `json:"totalBlacklisted"` - // Number of contacts in the list - TotalSubscribers int64 `json:"totalSubscribers"` + // Attributes for company creation + Attributes map[string]interface{} `json:"attributes,omitempty"` } diff --git a/lib/model_body_3.go b/lib/model_body_3.go new file mode 100644 index 0000000..8d3e339 --- /dev/null +++ b/lib/model_body_3.go @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type Body3 struct { + // Name of company + Name string `json:"name,omitempty"` + // Attributes for company update + Attributes map[string]interface{} `json:"attributes,omitempty"` +} diff --git a/lib/model_body_4.go b/lib/model_body_4.go new file mode 100644 index 0000000..fa3d936 --- /dev/null +++ b/lib/model_body_4.go @@ -0,0 +1,22 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type Body4 struct { + // Contact ids for contacts to be linked with company + LinkContactIds []int32 `json:"linkContactIds,omitempty"` + // Contact ids for contacts to be unlinked from company + UnlinkContactIds []int32 `json:"unlinkContactIds,omitempty"` + // Deals ids for deals to be linked with company + LinkDealsIds []string `json:"linkDealsIds,omitempty"` + // Deals ids for deals to be unlinked from company + UnlinkDealsIds []string `json:"unlinkDealsIds,omitempty"` +} diff --git a/lib/model_all_ofget_sms_campaigns_campaigns_items.go b/lib/model_body_5.go similarity index 54% rename from lib/model_all_ofget_sms_campaigns_campaigns_items.go rename to lib/model_body_5.go index 6469cd5..cd6633e 100644 --- a/lib/model_all_ofget_sms_campaigns_campaigns_items.go +++ b/lib/model_body_5.go @@ -1,31 +1,39 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type AllOfgetSmsCampaignsCampaignsItems struct { - // ID of the SMS Campaign - Id int64 `json:"id"` - // Name of the SMS Campaign +import ( + "time" +) + +type Body5 struct { + // Name of task Name string `json:"name"` - // Status of the SMS Campaign - Status string `json:"status"` - // Content of the SMS Campaign - Content string `json:"content"` - // UTC date-time on which SMS campaign is scheduled. Should be in YYYY-MM-DDTHH:mm:ss.SSSZ format - ScheduledAt string `json:"scheduledAt,omitempty"` - // Sender of the SMS Campaign - Sender string `json:"sender"` - // Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` - // UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - Recipients *interface{} `json:"recipients"` - Statistics *interface{} `json:"statistics"` + // Duration of task in milliseconds [1 minute = 60000 ms] + Duration int64 `json:"duration,omitempty"` + // Id for type of task e.g Call / Email / Meeting etc. + TaskTypeId string `json:"taskTypeId"` + // Task due date and time + Date time.Time `json:"date"` + // Notes added to a task + Notes string `json:"notes,omitempty"` + // Task marked as done + Done bool `json:"done,omitempty"` + // User id to whom task is assigned + AssignToId string `json:"assignToId,omitempty"` + // Contact ids for contacts linked to this task + ContactsIds []int32 `json:"contactsIds,omitempty"` + // Deal ids for deals a task is linked to + DealsIds []string `json:"dealsIds,omitempty"` + // Companies ids for companies a task is linked to + CompaniesIds []string `json:"companiesIds,omitempty"` + Reminder *TaskReminder `json:"reminder,omitempty"` } diff --git a/lib/model_body_6.go b/lib/model_body_6.go new file mode 100644 index 0000000..6d6e449 --- /dev/null +++ b/lib/model_body_6.go @@ -0,0 +1,38 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +type Body6 struct { + // Name of task + Name string `json:"name,omitempty"` + // Duration of task in milliseconds [1 minute = 60000 ms] + Duration int32 `json:"duration,omitempty"` + // Id for type of task e.g Call / Email / Meeting etc. + TaskTypeId string `json:"taskTypeId,omitempty"` + // Task date/time + Date time.Time `json:"date,omitempty"` + // Notes added to a task + Notes string `json:"notes,omitempty"` + // Task marked as done + Done bool `json:"done,omitempty"` + // User id to whom task is assigned + AssignToId string `json:"assignToId,omitempty"` + // Contact ids for contacts linked to this task + ContactsIds []int32 `json:"contactsIds,omitempty"` + // Deal ids for deals a task is linked to + DealsIds []string `json:"dealsIds,omitempty"` + // Companies ids for companies a task is linked to + CompaniesIds []string `json:"companiesIds,omitempty"` +} diff --git a/lib/model_companies_list.go b/lib/model_companies_list.go new file mode 100644 index 0000000..6b4fcc9 --- /dev/null +++ b/lib/model_companies_list.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of comapnies +type CompaniesList struct { + // List of compaies + Items []Company `json:"items,omitempty"` +} diff --git a/lib/model_company.go b/lib/model_company.go new file mode 100644 index 0000000..0b37f30 --- /dev/null +++ b/lib/model_company.go @@ -0,0 +1,23 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Company Details +type Company struct { + // Unique company id + Id string `json:"id,omitempty"` + // Company attributes with values + Attributes map[string]interface{} `json:"attributes,omitempty"` + // Contact ids for contacts linked to this company + LinkedContactsIds []int32 `json:"linkedContactsIds,omitempty"` + // Deals ids for companies linked to this company + LinkedDealsIds []string `json:"linkedDealsIds,omitempty"` +} diff --git a/lib/model_company_attributes.go b/lib/model_company_attributes.go new file mode 100644 index 0000000..c02680a --- /dev/null +++ b/lib/model_company_attributes.go @@ -0,0 +1,15 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of company attributes +type CompanyAttributes struct { +} diff --git a/lib/model_company_attributes_inner.go b/lib/model_company_attributes_inner.go new file mode 100644 index 0000000..d34351c --- /dev/null +++ b/lib/model_company_attributes_inner.go @@ -0,0 +1,20 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of attributes +type CompanyAttributesInner struct { + InternalName string `json:"internalName,omitempty"` + Label string `json:"label,omitempty"` + AttributeTypeName string `json:"attributeTypeName,omitempty"` + AttributeOptions []interface{} `json:"attributeOptions,omitempty"` + IsRequired bool `json:"isRequired,omitempty"` +} diff --git a/lib/model_create_attribute.go b/lib/model_create_attribute.go index 746e5bf..91bef06 100644 --- a/lib/model_create_attribute.go +++ b/lib/model_create_attribute.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateAttribute struct { diff --git a/lib/model_create_attribute_enumeration.go b/lib/model_create_attribute_enumeration.go index 0118074..d43b5e0 100644 --- a/lib/model_create_attribute_enumeration.go +++ b/lib/model_create_attribute_enumeration.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateAttributeEnumeration struct { diff --git a/lib/model_create_child.go b/lib/model_create_child.go index aed317c..cb9664f 100644 --- a/lib/model_create_child.go +++ b/lib/model_create_child.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateChild struct { diff --git a/lib/model_create_contact.go b/lib/model_create_contact.go index cb7366a..2ac40c6 100644 --- a/lib/model_create_contact.go +++ b/lib/model_create_contact.go @@ -1,19 +1,20 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateContact struct { // Email address of the user. Mandatory if \"SMS\" field is not passed in \"attributes\" parameter. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} Email string `json:"email,omitempty"` - // Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} - Attributes *interface{} `json:"attributes,omitempty"` + // Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + Attributes map[string]interface{} `json:"attributes,omitempty"` // Set this field to blacklist the contact for emails (emailBlacklisted = true) EmailBlacklisted bool `json:"emailBlacklisted,omitempty"` // Set this field to blacklist the contact for SMS (smsBlacklisted = true) diff --git a/lib/model_create_doi_contact.go b/lib/model_create_doi_contact.go index 7fab4b9..24708af 100644 --- a/lib/model_create_doi_contact.go +++ b/lib/model_create_doi_contact.go @@ -1,19 +1,20 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateDoiContact struct { // Email address where the confirmation email will be sent. This email address will be the identifier for all other contact attributes. Email string `json:"email"` // Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {'FNAME':'Elly', 'LNAME':'Roger'} - Attributes *interface{} `json:"attributes,omitempty"` + Attributes map[string]interface{} `json:"attributes,omitempty"` // Lists under user account where contact should be added IncludeListIds []int64 `json:"includeListIds"` // Lists under user account where contact should not be added diff --git a/lib/model_create_email_campaign.go b/lib/model_create_email_campaign.go index 300299f..a1c0a93 100644 --- a/lib/model_create_email_campaign.go +++ b/lib/model_create_email_campaign.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateEmailCampaign struct { // Tag of the campaign - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *CreateEmailCampaignSender `json:"sender"` // Name of the campaign Name string `json:"name"` @@ -28,7 +29,7 @@ type CreateEmailCampaign struct { // Email on which the campaign recipients will be able to reply to ReplyTo string `json:"replyTo,omitempty"` // To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization - ToField string `json:"toField,omitempty"` + ToField string `json:"toField,omitempty"` Recipients *CreateEmailCampaignRecipients `json:"recipients,omitempty"` // Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps AttachmentUrl string `json:"attachmentUrl,omitempty"` @@ -43,7 +44,7 @@ type CreateEmailCampaign struct { // Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed UtmCampaign string `json:"utmCampaign,omitempty"` // Pass the set of attributes to customize the type classic campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. Only available if 'type' is 'classic'. It's considered only if campaign is in New Template Language format. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' - Params *interface{} `json:"params,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` // Set this to true if you want to send your campaign at best time. SendAtBestTime bool `json:"sendAtBestTime,omitempty"` // Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered when abTesting is set to true. 'subjectA' & 'subjectB' are mandatory together & 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B diff --git a/lib/model_create_email_campaign_recipients.go b/lib/model_create_email_campaign_recipients.go index f986d43..c65ba46 100644 --- a/lib/model_create_email_campaign_recipients.go +++ b/lib/model_create_email_campaign_recipients.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // List ids to include/exclude from campaign diff --git a/lib/model_create_email_campaign_sender.go b/lib/model_create_email_campaign_sender.go index 90babfc..244a649 100644 --- a/lib/model_create_email_campaign_sender.go +++ b/lib/model_create_email_campaign_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` diff --git a/lib/model_create_list.go b/lib/model_create_list.go index c962f95..0d88dd8 100644 --- a/lib/model_create_list.go +++ b/lib/model_create_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateList struct { diff --git a/lib/model_create_model.go b/lib/model_create_model.go index b4cd036..f85fab0 100644 --- a/lib/model_create_model.go +++ b/lib/model_create_model.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateModel struct { diff --git a/lib/model_create_reseller.go b/lib/model_create_reseller.go index f622f11..1a574ae 100644 --- a/lib/model_create_reseller.go +++ b/lib/model_create_reseller.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateReseller struct { diff --git a/lib/model_create_sender.go b/lib/model_create_sender.go index 33a11ca..6bee274 100644 --- a/lib/model_create_sender.go +++ b/lib/model_create_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSender struct { diff --git a/lib/model_create_sender_ips.go b/lib/model_create_sender_ips.go index 4eea954..2444901 100644 --- a/lib/model_create_sender_ips.go +++ b/lib/model_create_sender_ips.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSenderIps struct { diff --git a/lib/model_create_sender_model.go b/lib/model_create_sender_model.go index b2b882b..4a6341f 100644 --- a/lib/model_create_sender_model.go +++ b/lib/model_create_sender_model.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSenderModel struct { diff --git a/lib/model_create_sms_campaign.go b/lib/model_create_sms_campaign.go index 5cbefa2..99683dd 100644 --- a/lib/model_create_sms_campaign.go +++ b/lib/model_create_sms_campaign.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSmsCampaign struct { @@ -15,8 +16,10 @@ type CreateSmsCampaign struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** Sender string `json:"sender"` // Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS - Content string `json:"content"` + Content string `json:"content"` Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"` // UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. ScheduledAt string `json:"scheduledAt,omitempty"` + // Format of the message. It indicates whether the content should be treated as unicode or not. + UnicodeEnabled bool `json:"unicodeEnabled,omitempty"` } diff --git a/lib/model_create_sms_campaign_recipients.go b/lib/model_create_sms_campaign_recipients.go index ef67cbb..e4d3a5c 100644 --- a/lib/model_create_sms_campaign_recipients.go +++ b/lib/model_create_sms_campaign_recipients.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSmsCampaignRecipients struct { diff --git a/lib/model_create_smtp_email.go b/lib/model_create_smtp_email.go index d0900ee..8c167f3 100644 --- a/lib/model_create_smtp_email.go +++ b/lib/model_create_smtp_email.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSmtpEmail struct { // Message ID of the transactional email sent - MessageId string `json:"messageId,omitempty"` + MessageId string `json:"messageId,omitempty"` MessageIds []string `json:"messageIds,omitempty"` } diff --git a/lib/model_create_smtp_template.go b/lib/model_create_smtp_template.go index 790e2e2..b47c15a 100644 --- a/lib/model_create_smtp_template.go +++ b/lib/model_create_smtp_template.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateSmtpTemplate struct { // Tag of the template - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *CreateSmtpTemplateSender `json:"sender"` // Name of the template TemplateName string `json:"templateName"` diff --git a/lib/model_create_smtp_template_sender.go b/lib/model_create_smtp_template_sender.go index 8d18e3b..fdc139c 100644 --- a/lib/model_create_smtp_template_sender.go +++ b/lib/model_create_smtp_template_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` diff --git a/lib/model_create_sub_account.go b/lib/model_create_sub_account.go new file mode 100644 index 0000000..d4fb8f8 --- /dev/null +++ b/lib/model_create_sub_account.go @@ -0,0 +1,22 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type CreateSubAccount struct { + // Set the name of the sub-account company + CompanyName string `json:"companyName"` + // Email address for the organization + Email string `json:"email"` + // Set the language of the sub-account + Language string `json:"language,omitempty"` + // Set the timezone of the sub-account + Timezone string `json:"timezone,omitempty"` +} diff --git a/lib/model_all_ofget_lists_lists_items.go b/lib/model_create_sub_account_response.go similarity index 74% rename from lib/model_all_ofget_lists_lists_items.go rename to lib/model_create_sub_account_response.go index da095da..c26b309 100644 --- a/lib/model_all_ofget_lists_lists_items.go +++ b/lib/model_create_sub_account_response.go @@ -1,23 +1,16 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type AllOfgetListsListsItems struct { - // ID of the list +type CreateSubAccountResponse struct { + // ID of the sub-account created Id int64 `json:"id"` - // Name of the list - Name string `json:"name"` - // Number of blacklisted contacts in the list - TotalBlacklisted int64 `json:"totalBlacklisted"` - // Number of contacts in the list - TotalSubscribers int64 `json:"totalSubscribers"` - // ID of the folder - FolderId int64 `json:"folderId"` } diff --git a/lib/model_create_update_contact_model.go b/lib/model_create_update_contact_model.go index 1f6acbf..100cb70 100644 --- a/lib/model_create_update_contact_model.go +++ b/lib/model_create_update_contact_model.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateUpdateContactModel struct { diff --git a/lib/model_create_update_folder.go b/lib/model_create_update_folder.go index 965338a..0964fc6 100644 --- a/lib/model_create_update_folder.go +++ b/lib/model_create_update_folder.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateUpdateFolder struct { diff --git a/lib/model_create_webhook.go b/lib/model_create_webhook.go index dda590d..1bd0c86 100644 --- a/lib/model_create_webhook.go +++ b/lib/model_create_webhook.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreateWebhook struct { @@ -14,8 +15,10 @@ type CreateWebhook struct { Url string `json:"url"` // Description of the webhook Description string `json:"description,omitempty"` - // Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` + // - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` Events []string `json:"events"` // Type of the webhook Type_ string `json:"type,omitempty"` + // Inbound domain of webhook, required in case of event type `inbound` + Domain string `json:"domain,omitempty"` } diff --git a/lib/model_created_process_id.go b/lib/model_created_process_id.go index c060127..bbd3f4b 100644 --- a/lib/model_created_process_id.go +++ b/lib/model_created_process_id.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type CreatedProcessId struct { diff --git a/lib/model_deal.go b/lib/model_deal.go new file mode 100644 index 0000000..c193e62 --- /dev/null +++ b/lib/model_deal.go @@ -0,0 +1,23 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Deal Details +type Deal struct { + // Unique deal id + Id string `json:"id,omitempty"` + // Deal attributes with values + Attributes map[string]interface{} `json:"attributes,omitempty"` + // Contact ids for contacts linked to this deal + LinkedContactsIds []int32 `json:"linkedContactsIds,omitempty"` + // Companies ids for companies linked to this deal + LinkedCompaniesIds []string `json:"linkedCompaniesIds,omitempty"` +} diff --git a/lib/model_deal_attributes.go b/lib/model_deal_attributes.go new file mode 100644 index 0000000..b1de8c3 --- /dev/null +++ b/lib/model_deal_attributes.go @@ -0,0 +1,15 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of deal attributes +type DealAttributes struct { +} diff --git a/lib/model_deal_attributes_inner.go b/lib/model_deal_attributes_inner.go new file mode 100644 index 0000000..4348f00 --- /dev/null +++ b/lib/model_deal_attributes_inner.go @@ -0,0 +1,20 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of attributes +type DealAttributesInner struct { + InternalName string `json:"internalName,omitempty"` + Label string `json:"label,omitempty"` + AttributeTypeName string `json:"attributeTypeName,omitempty"` + AttributeOptions []interface{} `json:"attributeOptions,omitempty"` + IsRequired bool `json:"isRequired,omitempty"` +} diff --git a/lib/model_deals_list.go b/lib/model_deals_list.go new file mode 100644 index 0000000..fee471a --- /dev/null +++ b/lib/model_deals_list.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of Deals +type DealsList struct { + // List of deals + Items []Deal `json:"items,omitempty"` +} diff --git a/lib/model_delete_hardbounces.go b/lib/model_delete_hardbounces.go index f49af27..3da043c 100644 --- a/lib/model_delete_hardbounces.go +++ b/lib/model_delete_hardbounces.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type DeleteHardbounces struct { diff --git a/lib/model_email_export_recipients.go b/lib/model_email_export_recipients.go index 918be50..83e9bcc 100644 --- a/lib/model_email_export_recipients.go +++ b/lib/model_email_export_recipients.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type EmailExportRecipients struct { diff --git a/lib/model_error_model.go b/lib/model_error_model.go index b3ef3dc..36a7c07 100644 --- a/lib/model_error_model.go +++ b/lib/model_error_model.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type ErrorModel struct { diff --git a/lib/model_get_account.go b/lib/model_get_account.go index fbbd969..7fcb6ce 100644 --- a/lib/model_get_account.go +++ b/lib/model_get_account.go @@ -1,18 +1,27 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAccount struct { - Address *GetExtendedClientAddress `json:"address"` + // Login Email + Email string `json:"email"` + // First Name + FirstName string `json:"firstName"` + // Last Name + LastName string `json:"lastName"` + // Name of the company + CompanyName string `json:"companyName"` + Address *GetExtendedClientAddress `json:"address"` // Information about your plans and credits - Plan []GetAccountPlan `json:"plan"` - Relay *GetAccountRelay `json:"relay"` + Plan []GetAccountPlan `json:"plan"` + Relay *GetAccountRelay `json:"relay"` MarketingAutomation *GetAccountMarketingAutomation `json:"marketingAutomation,omitempty"` } diff --git a/lib/model_get_account_marketing_automation.go b/lib/model_get_account_marketing_automation.go index 99ca05c..82e5ae1 100644 --- a/lib/model_get_account_marketing_automation.go +++ b/lib/model_get_account_marketing_automation.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAccountMarketingAutomation struct { diff --git a/lib/model_get_account_plan.go b/lib/model_get_account_plan.go index 12a0154..144b6a2 100644 --- a/lib/model_get_account_plan.go +++ b/lib/model_get_account_plan.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAccountPlan struct { diff --git a/lib/model_get_account_relay.go b/lib/model_get_account_relay.go index 4155682..a9e97f5 100644 --- a/lib/model_get_account_relay.go +++ b/lib/model_get_account_relay.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Information about your transactional email account type GetAccountRelay struct { // Status of your transactional email Account (true=Enabled, false=Disabled) - Enabled bool `json:"enabled"` - Data *GetAccountRelayData `json:"data"` + Enabled bool `json:"enabled"` + Data *GetAccountRelayData `json:"data"` } diff --git a/lib/model_get_account_relay_data.go b/lib/model_get_account_relay_data.go index 38fe2e6..89a1493 100644 --- a/lib/model_get_account_relay_data.go +++ b/lib/model_get_account_relay_data.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Data regarding the transactional email account diff --git a/lib/model_get_aggregated_report.go b/lib/model_get_aggregated_report.go index 3322ef0..b079292 100644 --- a/lib/model_get_aggregated_report.go +++ b/lib/model_get_aggregated_report.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAggregatedReport struct { diff --git a/lib/model_get_attributes.go b/lib/model_get_attributes.go index 17b7efb..8e0b8a0 100644 --- a/lib/model_get_attributes.go +++ b/lib/model_get_attributes.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAttributes struct { diff --git a/lib/model_get_attributes_attributes.go b/lib/model_get_attributes_attributes.go index fdacb04..adfa86d 100644 --- a/lib/model_get_attributes_attributes.go +++ b/lib/model_get_attributes_attributes.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAttributesAttributes struct { diff --git a/lib/model_get_attributes_enumeration.go b/lib/model_get_attributes_enumeration.go index 6c50f28..4a9f70b 100644 --- a/lib/model_get_attributes_enumeration.go +++ b/lib/model_get_attributes_enumeration.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetAttributesEnumeration struct { diff --git a/lib/model_get_blocked_domains.go b/lib/model_get_blocked_domains.go index 5486546..e250a0e 100644 --- a/lib/model_get_blocked_domains.go +++ b/lib/model_get_blocked_domains.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // list of blocked domains diff --git a/lib/model_get_campaign_overview.go b/lib/model_get_campaign_overview.go index 3bc58a6..31d3961 100644 --- a/lib/model_get_campaign_overview.go +++ b/lib/model_get_campaign_overview.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetCampaignOverview struct { diff --git a/lib/model_get_campaign_recipients.go b/lib/model_get_campaign_recipients.go index 8e64a51..d4a016b 100644 --- a/lib/model_get_campaign_recipients.go +++ b/lib/model_get_campaign_recipients.go @@ -1,15 +1,16 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetCampaignRecipients struct { - Lists []int64 `json:"lists"` + Lists []int64 `json:"lists"` ExclusionLists []int64 `json:"exclusionLists"` } diff --git a/lib/model_get_campaign_stats.go b/lib/model_get_campaign_stats.go index bd3f514..cea8ec4 100644 --- a/lib/model_get_campaign_stats.go +++ b/lib/model_get_campaign_stats.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetCampaignStats struct { @@ -28,6 +29,12 @@ type GetCampaignStats struct { HardBounces int64 `json:"hardBounces"` // Number of unique openings for the campaign UniqueViews int64 `json:"uniqueViews"` + // Recipients without any privacy protection option enabled in their email client + TrackableViews int64 `json:"trackableViews"` + // Rate of recipients without any privacy protection option enabled in their email client + TrackableViewsRate float32 `json:"trackableViewsRate,omitempty"` + // Rate of recipients without any privacy protection option enabled in their email client, applied to all delivered emails + EstimatedViews int64 `json:"estimatedViews,omitempty"` // Number of unsubscription for the campaign Unsubscriptions int64 `json:"unsubscriptions"` // Number of openings for the campaign diff --git a/lib/model_get_child_account_creation_status.go b/lib/model_get_child_account_creation_status.go index 5a8c3f6..0efbccd 100644 --- a/lib/model_get_child_account_creation_status.go +++ b/lib/model_get_child_account_creation_status.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetChildAccountCreationStatus struct { diff --git a/lib/model_get_child_domain.go b/lib/model_get_child_domain.go index a943a4b..ccf6711 100644 --- a/lib/model_get_child_domain.go +++ b/lib/model_get_child_domain.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetChildDomain struct { diff --git a/lib/model_get_child_domains.go b/lib/model_get_child_domains.go new file mode 100644 index 0000000..6f5d3a1 --- /dev/null +++ b/lib/model_get_child_domains.go @@ -0,0 +1,14 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetChildDomains struct { +} diff --git a/lib/model_get_child_info.go b/lib/model_get_child_info.go index d08a4a8..a4846f5 100644 --- a/lib/model_get_child_info.go +++ b/lib/model_get_child_info.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetChildInfo struct { @@ -17,12 +18,12 @@ type GetChildInfo struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Credits *GetChildInfoCredits `json:"credits,omitempty"` - Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` + CompanyName string `json:"companyName"` + Credits *GetChildInfoCredits `json:"credits,omitempty"` + Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` // The encrypted password of child account Password string `json:"password"` // IP(s) associated to a child account user - Ips []string `json:"ips,omitempty"` + Ips []string `json:"ips,omitempty"` ApiKeys *GetChildInfoApiKeys `json:"apiKeys,omitempty"` } diff --git a/lib/model_get_child_info_api_keys.go b/lib/model_get_child_info_api_keys.go index c71377b..abd17fc 100644 --- a/lib/model_get_child_info_api_keys.go +++ b/lib/model_get_child_info_api_keys.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // API Keys associated to child account diff --git a/lib/model_get_child_info_api_keys_v2.go b/lib/model_get_child_info_api_keys_v2.go index 1b2a709..e09ca4b 100644 --- a/lib/model_get_child_info_api_keys_v2.go +++ b/lib/model_get_child_info_api_keys_v2.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetChildInfoApiKeysV2 struct { diff --git a/lib/model_get_child_info_api_keys_v3.go b/lib/model_get_child_info_api_keys_v3.go index 69819fa..5582af4 100644 --- a/lib/model_get_child_info_api_keys_v3.go +++ b/lib/model_get_child_info_api_keys_v3.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetChildInfoApiKeysV3 struct { diff --git a/lib/model_get_child_info_credits.go b/lib/model_get_child_info_credits.go index 7bb5624..231b3ec 100644 --- a/lib/model_get_child_info_credits.go +++ b/lib/model_get_child_info_credits.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Credits available for your child diff --git a/lib/model_get_child_info_statistics.go b/lib/model_get_child_info_statistics.go index aeb4310..f8ea6c4 100644 --- a/lib/model_get_child_info_statistics.go +++ b/lib/model_get_child_info_statistics.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Statistics about your child account activity diff --git a/lib/model_get_children_list.go b/lib/model_get_children_list.go index 433e002..bda9f6e 100644 --- a/lib/model_get_children_list.go +++ b/lib/model_get_children_list.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetChildrenList struct { // Your children's account information - Children []AllOfgetChildrenListChildrenItems `json:"children,omitempty"` + Children []interface{} `json:"children,omitempty"` // Number of child accounts Count int64 `json:"count,omitempty"` } diff --git a/lib/model_get_client.go b/lib/model_get_client.go index d2215fc..5015545 100644 --- a/lib/model_get_client.go +++ b/lib/model_get_client.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetClient struct { diff --git a/lib/model_get_contact_campaign_stats.go b/lib/model_get_contact_campaign_stats.go index 73a3514..e37112d 100644 --- a/lib/model_get_contact_campaign_stats.go +++ b/lib/model_get_contact_campaign_stats.go @@ -1,22 +1,24 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Campaign Statistics for the contact type GetContactCampaignStats struct { - MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"` - HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"` - SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` - Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` - Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"` - Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"` - Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"` - TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"` + MessagesSent []GetExtendedContactDetailsStatisticsMessagesSent `json:"messagesSent,omitempty"` + HardBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"hardBounces,omitempty"` + SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` + Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` + Unsubscriptions *GetContactCampaignStatsUnsubscriptions `json:"unsubscriptions,omitempty"` + Opened []GetContactCampaignStatsOpened `json:"opened,omitempty"` + Clicked []GetContactCampaignStatsClicked `json:"clicked,omitempty"` + TransacAttributes []GetContactCampaignStatsTransacAttributes `json:"transacAttributes,omitempty"` + Delivered []GetExtendedContactDetailsStatisticsMessagesSent `json:"delivered,omitempty"` } diff --git a/lib/model_get_contact_campaign_stats_clicked.go b/lib/model_get_contact_campaign_stats_clicked.go index 0f108f5..13e32d9 100644 --- a/lib/model_get_contact_campaign_stats_clicked.go +++ b/lib/model_get_contact_campaign_stats_clicked.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetContactCampaignStatsClicked struct { // ID of the campaign which generated the event - CampaignId int64 `json:"campaignId"` - Links []GetExtendedContactDetailsStatisticsLinks `json:"links"` + CampaignId int64 `json:"campaignId"` + Links []GetExtendedContactDetailsStatisticsLinks `json:"links"` } diff --git a/lib/model_get_contact_campaign_stats_opened.go b/lib/model_get_contact_campaign_stats_opened.go index e0c86f2..b3e875c 100644 --- a/lib/model_get_contact_campaign_stats_opened.go +++ b/lib/model_get_contact_campaign_stats_opened.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetContactCampaignStatsOpened struct { diff --git a/lib/model_get_contact_campaign_stats_transac_attributes.go b/lib/model_get_contact_campaign_stats_transac_attributes.go index 2ab0476..79aeeb4 100644 --- a/lib/model_get_contact_campaign_stats_transac_attributes.go +++ b/lib/model_get_contact_campaign_stats_transac_attributes.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetContactCampaignStatsTransacAttributes struct { diff --git a/lib/model_get_contact_campaign_stats_unsubscriptions.go b/lib/model_get_contact_campaign_stats_unsubscriptions.go index 6f2fec2..aab5208 100644 --- a/lib/model_get_contact_campaign_stats_unsubscriptions.go +++ b/lib/model_get_contact_campaign_stats_unsubscriptions.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetContactCampaignStatsUnsubscriptions struct { diff --git a/lib/model_get_contact_details.go b/lib/model_get_contact_details.go index 05da9da..8cabebe 100644 --- a/lib/model_get_contact_details.go +++ b/lib/model_get_contact_details.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetContactDetails struct { @@ -21,9 +22,9 @@ type GetContactDetails struct { // Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - ListIds []int64 `json:"listIds"` + ModifiedAt string `json:"modifiedAt"` + ListIds []int64 `json:"listIds"` ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"` // Set of attributes of the contact - Attributes *interface{} `json:"attributes"` + Attributes map[string]interface{} `json:"attributes"` } diff --git a/lib/model_get_contacts.go b/lib/model_get_contacts.go index 05dbf7c..996fd4c 100644 --- a/lib/model_get_contacts.go +++ b/lib/model_get_contacts.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetContacts struct { - Contacts []AllOfgetContactsContactsItems `json:"contacts"` + Contacts []interface{} `json:"contacts"` // Number of contacts Count int64 `json:"count"` } diff --git a/lib/model_get_device_browser_stats.go b/lib/model_get_device_browser_stats.go index d972120..98f0e23 100644 --- a/lib/model_get_device_browser_stats.go +++ b/lib/model_get_device_browser_stats.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetDeviceBrowserStats struct { diff --git a/lib/model_get_email_campaign.go b/lib/model_get_email_campaign.go index c469b1d..73213bc 100644 --- a/lib/model_get_email_campaign.go +++ b/lib/model_get_email_campaign.go @@ -1,21 +1,48 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetEmailCampaign struct { + // ID of the campaign + Id int64 `json:"id"` + // Name of the campaign + Name string `json:"name"` + // Subject of the campaign. Only available if `abTesting` flag of the campaign is `false` + Subject string `json:"subject,omitempty"` + // Type of campaign + Type_ string `json:"type"` + // Status of the campaign + Status string `json:"status"` + // UTC date-time on which campaign is scheduled (YYYY-MM-DDTHH:mm:ss.SSSZ) + ScheduledAt string `json:"scheduledAt,omitempty"` + // Status of A/B Test for the campaign. abTesting = false means it is disabled, & abTesting = true means it is enabled. + AbTesting bool `json:"abTesting,omitempty"` + // Subject A of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + SubjectA string `json:"subjectA,omitempty"` + // Subject B of the ab-test campaign. Only available if `abTesting` flag of the campaign is `true` + SubjectB string `json:"subjectB,omitempty"` + // The size of your ab-test groups. Only available if `abTesting` flag of the campaign is `true` + SplitRule int32 `json:"splitRule,omitempty"` + // Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` + WinnerCriteria string `json:"winnerCriteria,omitempty"` + // The duration of the test in hours at the end of which the winning version will be sent. Only available if `abTesting` flag of the campaign is `true` + WinnerDelay int32 `json:"winnerDelay,omitempty"` + // It is true if you have chosen to send your campaign at best time, otherwise it is false + SendAtBestTime bool `json:"sendAtBestTime,omitempty"` // Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) TestSent bool `json:"testSent"` // Header of the campaign Header string `json:"header"` // Footer of the campaign - Footer string `json:"footer"` + Footer string `json:"footer"` Sender *GetExtendedCampaignOverviewSender `json:"sender"` // Email defined as the \"Reply to\" of the campaign ReplyTo string `json:"replyTo"` @@ -40,7 +67,7 @@ type GetEmailCampaign struct { // Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' SentDate string `json:"sentDate,omitempty"` // Total number of non-delivered campaigns for a particular campaign id. - ReturnBounce int64 `json:"returnBounce,omitempty"` - Recipients *interface{} `json:"recipients"` - Statistics *interface{} `json:"statistics"` + ReturnBounce int64 `json:"returnBounce,omitempty"` + Recipients map[string]interface{} `json:"recipients"` + Statistics map[string]interface{} `json:"statistics"` } diff --git a/lib/model_get_email_campaigns.go b/lib/model_get_email_campaigns.go index d78cd42..fdfb855 100644 --- a/lib/model_get_email_campaigns.go +++ b/lib/model_get_email_campaigns.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetEmailCampaigns struct { - Campaigns []AllOfgetEmailCampaignsCampaignsItems `json:"campaigns,omitempty"` + Campaigns []interface{} `json:"campaigns,omitempty"` // Number of Email campaigns retrieved Count int64 `json:"count,omitempty"` } diff --git a/lib/model_get_email_event_report.go b/lib/model_get_email_event_report.go index ae46d81..2e07e1c 100644 --- a/lib/model_get_email_event_report.go +++ b/lib/model_get_email_event_report.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetEmailEventReport struct { diff --git a/lib/model_get_email_event_report_events.go b/lib/model_get_email_event_report_events.go index 3c7ab88..3049dd9 100644 --- a/lib/model_get_email_event_report_events.go +++ b/lib/model_get_email_event_report_events.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetEmailEventReportEvents struct { diff --git a/lib/model_get_extended_campaign_overview.go b/lib/model_get_extended_campaign_overview.go index 9e7cfe7..34a179a 100644 --- a/lib/model_get_extended_campaign_overview.go +++ b/lib/model_get_extended_campaign_overview.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedCampaignOverview struct { @@ -41,7 +42,7 @@ type GetExtendedCampaignOverview struct { // Header of the campaign Header string `json:"header"` // Footer of the campaign - Footer string `json:"footer"` + Footer string `json:"footer"` Sender *GetExtendedCampaignOverviewSender `json:"sender"` // Email defined as the \"Reply to\" of the campaign ReplyTo string `json:"replyTo"` diff --git a/lib/model_get_extended_campaign_overview_sender.go b/lib/model_get_extended_campaign_overview_sender.go index 6aff0d0..68b3075 100644 --- a/lib/model_get_extended_campaign_overview_sender.go +++ b/lib/model_get_extended_campaign_overview_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedCampaignOverviewSender struct { diff --git a/lib/model_get_extended_campaign_stats.go b/lib/model_get_extended_campaign_stats.go index ac3d6b9..17557e3 100644 --- a/lib/model_get_extended_campaign_stats.go +++ b/lib/model_get_extended_campaign_stats.go @@ -1,26 +1,29 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedCampaignStats struct { // Overall statistics of the campaign - GlobalStats *AllOfgetExtendedCampaignStatsGlobalStats `json:"globalStats"` + GlobalStats map[string]interface{} `json:"globalStats"` // List-wise statistics of the campaign. - CampaignStats []AllOfgetExtendedCampaignStatsCampaignStatsItems `json:"campaignStats"` + CampaignStats []interface{} `json:"campaignStats"` // Number of clicks on mirror link MirrorClick int64 `json:"mirrorClick"` // Number of remaning emails to send Remaining int64 `json:"remaining"` // Statistics about the number of clicks for the links - LinksStats *interface{} `json:"linksStats"` - StatsByDomain *map[string]GetCampaignStats `json:"statsByDomain"` + LinksStats map[string]interface{} `json:"linksStats"` + StatsByDomain *GetStatsByDomain `json:"statsByDomain"` + // Statistics about the campaign on the basis of various devices StatsByDevice *GetStatsByDevice `json:"statsByDevice"` - StatsByBrowser *map[string]GetDeviceBrowserStats `json:"statsByBrowser"` + // Statistics about the campaign on the basis of various browsers + StatsByBrowser *GetStatsByBrowser `json:"statsByBrowser"` } diff --git a/lib/model_get_extended_client.go b/lib/model_get_extended_client.go index 90e9973..07a9aa4 100644 --- a/lib/model_get_extended_client.go +++ b/lib/model_get_extended_client.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedClient struct { @@ -17,6 +18,6 @@ type GetExtendedClient struct { // Last Name LastName string `json:"lastName"` // Name of the company - CompanyName string `json:"companyName"` - Address *GetExtendedClientAddress `json:"address"` + CompanyName string `json:"companyName"` + Address *GetExtendedClientAddress `json:"address"` } diff --git a/lib/model_get_extended_client_address.go b/lib/model_get_extended_client_address.go index 943a370..661c536 100644 --- a/lib/model_get_extended_client_address.go +++ b/lib/model_get_extended_client_address.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Address informations diff --git a/lib/model_get_extended_contact_details.go b/lib/model_get_extended_contact_details.go index 2662afe..5cd6c4b 100644 --- a/lib/model_get_extended_contact_details.go +++ b/lib/model_get_extended_contact_details.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetails struct { @@ -21,10 +22,10 @@ type GetExtendedContactDetails struct { // Creation UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // Last modification UTC date-time of the contact (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - ListIds []int64 `json:"listIds"` + ModifiedAt string `json:"modifiedAt"` + ListIds []int64 `json:"listIds"` ListUnsubscribed []int64 `json:"listUnsubscribed,omitempty"` // Set of attributes of the contact - Attributes *interface{} `json:"attributes"` + Attributes map[string]interface{} `json:"attributes"` Statistics *GetExtendedContactDetailsStatistics `json:"statistics"` } diff --git a/lib/model_get_extended_contact_details_statistics.go b/lib/model_get_extended_contact_details_statistics.go index d4e4945..ec631d3 100644 --- a/lib/model_get_extended_contact_details_statistics.go +++ b/lib/model_get_extended_contact_details_statistics.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Campaign statistics of the contact @@ -18,7 +19,7 @@ type GetExtendedContactDetailsStatistics struct { // Listing of the softbounes generated by the contact SoftBounces []GetExtendedContactDetailsStatisticsMessagesSent `json:"softBounces,omitempty"` // Listing of the complaints generated by the contact - Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` + Complaints []GetExtendedContactDetailsStatisticsMessagesSent `json:"complaints,omitempty"` Unsubscriptions *GetExtendedContactDetailsStatisticsUnsubscriptions `json:"unsubscriptions,omitempty"` // Listing of the openings generated by the contact Opened []GetExtendedContactDetailsStatisticsOpened `json:"opened,omitempty"` @@ -26,4 +27,6 @@ type GetExtendedContactDetailsStatistics struct { Clicked []GetExtendedContactDetailsStatisticsClicked `json:"clicked,omitempty"` // Listing of the transactional attributes for the contact TransacAttributes []interface{} `json:"transacAttributes,omitempty"` + // Listing of the delivered campaign for the contact + Delivered []GetExtendedContactDetailsStatisticsDelivered `json:"delivered,omitempty"` } diff --git a/lib/model_get_extended_contact_details_statistics_clicked.go b/lib/model_get_extended_contact_details_statistics_clicked.go index 666355b..1ae672a 100644 --- a/lib/model_get_extended_contact_details_statistics_clicked.go +++ b/lib/model_get_extended_contact_details_statistics_clicked.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetailsStatisticsClicked struct { diff --git a/lib/model_get_extended_contact_details_statistics_delivered.go b/lib/model_get_extended_contact_details_statistics_delivered.go new file mode 100644 index 0000000..da448b8 --- /dev/null +++ b/lib/model_get_extended_contact_details_statistics_delivered.go @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetExtendedContactDetailsStatisticsDelivered struct { + // ID of the campaign which generated the event + CampaignId int64 `json:"campaignId"` + // UTC date-time of the event + EventTime string `json:"eventTime"` +} diff --git a/lib/model_get_extended_contact_details_statistics_links.go b/lib/model_get_extended_contact_details_statistics_links.go index e7677b4..08ec85f 100644 --- a/lib/model_get_extended_contact_details_statistics_links.go +++ b/lib/model_get_extended_contact_details_statistics_links.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetailsStatisticsLinks struct { diff --git a/lib/model_get_extended_contact_details_statistics_messages_sent.go b/lib/model_get_extended_contact_details_statistics_messages_sent.go index 840423b..32318f5 100644 --- a/lib/model_get_extended_contact_details_statistics_messages_sent.go +++ b/lib/model_get_extended_contact_details_statistics_messages_sent.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetailsStatisticsMessagesSent struct { diff --git a/lib/model_get_extended_contact_details_statistics_opened.go b/lib/model_get_extended_contact_details_statistics_opened.go index b315b83..fcf5df3 100644 --- a/lib/model_get_extended_contact_details_statistics_opened.go +++ b/lib/model_get_extended_contact_details_statistics_opened.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetailsStatisticsOpened struct { diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go index b73a7a3..dc88eaf 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Listing of the unsubscription for the contact diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go index 3cd8c19..e028966 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_admin_unsubscription.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetailsStatisticsUnsubscriptionsAdminUnsubscription struct { diff --git a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go index 962dd0a..773dfe7 100644 --- a/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go +++ b/lib/model_get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription struct { diff --git a/lib/model_get_extended_list.go b/lib/model_get_extended_list.go index d82af34..1e24fea 100644 --- a/lib/model_get_extended_list.go +++ b/lib/model_get_extended_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedList struct { @@ -18,10 +19,12 @@ type GetExtendedList struct { TotalBlacklisted int64 `json:"totalBlacklisted"` // Number of contacts in the list TotalSubscribers int64 `json:"totalSubscribers"` + // Number of unique contacts in the list + UniqueSubscribers int64 `json:"uniqueSubscribers"` // ID of the folder FolderId int64 `json:"folderId"` // Creation UTC date-time of the list (YYYY-MM-DDTHH:mm:ss.SSSZ) - CreatedAt string `json:"createdAt"` + CreatedAt string `json:"createdAt"` CampaignStats []GetExtendedListCampaignStats `json:"campaignStats,omitempty"` // Status telling if the list is dynamic or not (true=dynamic, false=not dynamic) DynamicList bool `json:"dynamicList,omitempty"` diff --git a/lib/model_get_extended_list_campaign_stats.go b/lib/model_get_extended_list_campaign_stats.go index a52aad0..5231457 100644 --- a/lib/model_get_extended_list_campaign_stats.go +++ b/lib/model_get_extended_list_campaign_stats.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetExtendedListCampaignStats struct { // ID of the campaign - CampaignId int64 `json:"campaignId"` - Stats *GetCampaignStats `json:"stats"` + CampaignId int64 `json:"campaignId"` + Stats *GetCampaignStats `json:"stats"` } diff --git a/lib/model_get_folder.go b/lib/model_get_folder.go index 1f6edcc..0dacb7f 100644 --- a/lib/model_get_folder.go +++ b/lib/model_get_folder.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetFolder struct { diff --git a/lib/model_get_folder_lists.go b/lib/model_get_folder_lists.go index c36922f..a962045 100644 --- a/lib/model_get_folder_lists.go +++ b/lib/model_get_folder_lists.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetFolderLists struct { - Lists []AllOfgetFolderListsListsItems `json:"lists,omitempty"` + Lists []interface{} `json:"lists,omitempty"` // Number of lists in the folder Count int64 `json:"count,omitempty"` } diff --git a/lib/model_get_folders.go b/lib/model_get_folders.go index af91ba7..93daba4 100644 --- a/lib/model_get_folders.go +++ b/lib/model_get_folders.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetFolders struct { - Folders []AllOfgetFoldersFoldersItems `json:"folders,omitempty"` + Folders []interface{} `json:"folders,omitempty"` // Number of folders available in your account Count int64 `json:"count,omitempty"` } diff --git a/lib/model_get_inbound_email_events.go b/lib/model_get_inbound_email_events.go new file mode 100644 index 0000000..d3a72af --- /dev/null +++ b/lib/model_get_inbound_email_events.go @@ -0,0 +1,15 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetInboundEmailEvents struct { + Events []GetInboundEmailEventsEvents `json:"events,omitempty"` +} diff --git a/lib/model_get_inbound_email_events_by_uuid.go b/lib/model_get_inbound_email_events_by_uuid.go new file mode 100644 index 0000000..03f38ab --- /dev/null +++ b/lib/model_get_inbound_email_events_by_uuid.go @@ -0,0 +1,34 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +type GetInboundEmailEventsByUuid struct { + // Date when email was received on SMTP relay + ReceivedAt time.Time `json:"receivedAt,omitempty"` + // Date when email was delivered successfully to client’s webhook + DeliveredAt time.Time `json:"deliveredAt,omitempty"` + // Recipient’s email address + Recipient string `json:"recipient,omitempty"` + // Sender’s email address + Sender string `json:"sender,omitempty"` + // Value of the Message-ID header. This will be present only after the processing is done. + MessageId string `json:"messageId,omitempty"` + // Value of the Subject header. This will be present only after the processing is done. + Subject string `json:"subject,omitempty"` + // List of attachments of the email. This will be present only after the processing is done. + Attachments []GetInboundEmailEventsByUuidAttachments `json:"attachments,omitempty"` + // List of events/logs that describe the lifecycle of the email on SIB platform + Logs []GetInboundEmailEventsByUuidLogs `json:"logs,omitempty"` +} diff --git a/lib/model_get_inbound_email_events_by_uuid_attachments.go b/lib/model_get_inbound_email_events_by_uuid_attachments.go new file mode 100644 index 0000000..7887e5f --- /dev/null +++ b/lib/model_get_inbound_email_events_by_uuid_attachments.go @@ -0,0 +1,22 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetInboundEmailEventsByUuidAttachments struct { + // filename specified in the Content-Disposition header of the attachment + Name string `json:"name,omitempty"` + // value of the Content-Type header of the attachment + ContentType string `json:"contentType,omitempty"` + // value of the Content-ID header of the attachment. + ContentId string `json:"contentId,omitempty"` + // size of the attachment in bytes + ContentLength int32 `json:"contentLength,omitempty"` +} diff --git a/lib/model_get_inbound_email_events_by_uuid_logs.go b/lib/model_get_inbound_email_events_by_uuid_logs.go new file mode 100644 index 0000000..8e3b7aa --- /dev/null +++ b/lib/model_get_inbound_email_events_by_uuid_logs.go @@ -0,0 +1,22 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +type GetInboundEmailEventsByUuidLogs struct { + // Date of the event + Date time.Time `json:"date,omitempty"` + // Type of the event + Type_ string `json:"type,omitempty"` +} diff --git a/lib/model_get_inbound_email_events_events.go b/lib/model_get_inbound_email_events_events.go new file mode 100644 index 0000000..5dece61 --- /dev/null +++ b/lib/model_get_inbound_email_events_events.go @@ -0,0 +1,26 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +type GetInboundEmailEventsEvents struct { + // UUID that can be used to fetch additional data + Uuid string `json:"uuid"` + // Date when email was received on SMTP relay + Date time.Time `json:"date"` + // Sender’s email address + Sender string `json:"sender"` + // Recipient’s email address + Recipient string `json:"recipient"` +} diff --git a/lib/model_get_ip.go b/lib/model_get_ip.go index 7551cac..4d85443 100644 --- a/lib/model_get_ip.go +++ b/lib/model_get_ip.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetIp struct { diff --git a/lib/model_get_ip_from_sender.go b/lib/model_get_ip_from_sender.go index e64bedd..598b48b 100644 --- a/lib/model_get_ip_from_sender.go +++ b/lib/model_get_ip_from_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetIpFromSender struct { diff --git a/lib/model_get_ips.go b/lib/model_get_ips.go index 2b84615..a6d26ba 100644 --- a/lib/model_get_ips.go +++ b/lib/model_get_ips.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetIps struct { diff --git a/lib/model_get_ips_from_sender.go b/lib/model_get_ips_from_sender.go index 57bbca6..86ec7e4 100644 --- a/lib/model_get_ips_from_sender.go +++ b/lib/model_get_ips_from_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetIpsFromSender struct { diff --git a/lib/model_get_list.go b/lib/model_get_list.go index 3a5d103..baf6927 100644 --- a/lib/model_get_list.go +++ b/lib/model_get_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetList struct { @@ -18,4 +19,6 @@ type GetList struct { TotalBlacklisted int64 `json:"totalBlacklisted"` // Number of contacts in the list TotalSubscribers int64 `json:"totalSubscribers"` + // Number of unique contacts in the list + UniqueSubscribers int64 `json:"uniqueSubscribers"` } diff --git a/lib/model_get_lists.go b/lib/model_get_lists.go index 4db7bed..0f41ccb 100644 --- a/lib/model_get_lists.go +++ b/lib/model_get_lists.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetLists struct { // Listing of all the lists available in your account - Lists []AllOfgetListsListsItems `json:"lists,omitempty"` + Lists []interface{} `json:"lists,omitempty"` // Number of lists in your account Count int64 `json:"count,omitempty"` } diff --git a/lib/model_get_process.go b/lib/model_get_process.go index 55ce250..c427510 100644 --- a/lib/model_get_process.go +++ b/lib/model_get_process.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetProcess struct { diff --git a/lib/model_get_processes.go b/lib/model_get_processes.go index 80534f9..361b7b1 100644 --- a/lib/model_get_processes.go +++ b/lib/model_get_processes.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetProcesses struct { diff --git a/lib/model_get_reports.go b/lib/model_get_reports.go index 72882e2..ec60998 100644 --- a/lib/model_get_reports.go +++ b/lib/model_get_reports.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetReports struct { diff --git a/lib/model_get_reports_reports.go b/lib/model_get_reports_reports.go index 9f48960..e9bd26e 100644 --- a/lib/model_get_reports_reports.go +++ b/lib/model_get_reports_reports.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetReportsReports struct { diff --git a/lib/model_get_scheduled_email_by_batch_id.go b/lib/model_get_scheduled_email_by_batch_id.go new file mode 100644 index 0000000..c67c1b4 --- /dev/null +++ b/lib/model_get_scheduled_email_by_batch_id.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetScheduledEmailByBatchId struct { + // Total number of batches + Count int32 `json:"count,omitempty"` + Batches []GetScheduledEmailByBatchIdBatches `json:"batches,omitempty"` +} diff --git a/lib/model_get_scheduled_email_by_batch_id_batches.go b/lib/model_get_scheduled_email_by_batch_id_batches.go new file mode 100644 index 0000000..72a3b0d --- /dev/null +++ b/lib/model_get_scheduled_email_by_batch_id_batches.go @@ -0,0 +1,24 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +type GetScheduledEmailByBatchIdBatches struct { + // Datetime for which the batch was scheduled + ScheduledAt time.Time `json:"scheduledAt"` + // Datetime on which the batch was scheduled + CreatedAt time.Time `json:"createdAt"` + // Current status of the scheduled batch + Status string `json:"status"` +} diff --git a/lib/model_get_scheduled_email_by_message_id.go b/lib/model_get_scheduled_email_by_message_id.go new file mode 100644 index 0000000..678998b --- /dev/null +++ b/lib/model_get_scheduled_email_by_message_id.go @@ -0,0 +1,24 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +type GetScheduledEmailByMessageId struct { + // Datetime for which the email was scheduled + ScheduledAt time.Time `json:"scheduledAt"` + // Datetime on which the email was scheduled + CreatedAt time.Time `json:"createdAt"` + // Current status of the scheduled email + Status string `json:"status"` +} diff --git a/lib/model_get_senders_list.go b/lib/model_get_senders_list.go index b4fdd03..4c48234 100644 --- a/lib/model_get_senders_list.go +++ b/lib/model_get_senders_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSendersList struct { diff --git a/lib/model_get_senders_list_ips.go b/lib/model_get_senders_list_ips.go index 9bc726c..a88f4ee 100644 --- a/lib/model_get_senders_list_ips.go +++ b/lib/model_get_senders_list_ips.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSendersListIps struct { diff --git a/lib/model_get_senders_list_senders.go b/lib/model_get_senders_list_senders.go index 3576879..73f25d1 100644 --- a/lib/model_get_senders_list_senders.go +++ b/lib/model_get_senders_list_senders.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSendersListSenders struct { diff --git a/lib/model_get_shared_template_url.go b/lib/model_get_shared_template_url.go index 422ac34..623d831 100644 --- a/lib/model_get_shared_template_url.go +++ b/lib/model_get_shared_template_url.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSharedTemplateUrl struct { diff --git a/lib/model_get_sms_campaign.go b/lib/model_get_sms_campaign.go index dd4a0fa..ccf67af 100644 --- a/lib/model_get_sms_campaign.go +++ b/lib/model_get_sms_campaign.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmsCampaign struct { @@ -25,7 +26,7 @@ type GetSmsCampaign struct { // Creation UTC date-time of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) CreatedAt string `json:"createdAt"` // UTC date-time of last modification of the SMS campaign (YYYY-MM-DDTHH:mm:ss.SSSZ) - ModifiedAt string `json:"modifiedAt"` - Recipients *interface{} `json:"recipients"` - Statistics *interface{} `json:"statistics"` + ModifiedAt string `json:"modifiedAt"` + Recipients map[string]interface{} `json:"recipients"` + Statistics map[string]interface{} `json:"statistics"` } diff --git a/lib/model_get_sms_campaign_overview.go b/lib/model_get_sms_campaign_overview.go index 2986d36..daaa453 100644 --- a/lib/model_get_sms_campaign_overview.go +++ b/lib/model_get_sms_campaign_overview.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmsCampaignOverview struct { diff --git a/lib/model_get_sms_campaign_stats.go b/lib/model_get_sms_campaign_stats.go index 5d000d7..bb87cbd 100644 --- a/lib/model_get_sms_campaign_stats.go +++ b/lib/model_get_sms_campaign_stats.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmsCampaignStats struct { diff --git a/lib/model_get_sms_campaigns.go b/lib/model_get_sms_campaigns.go index 8cdadab..db4acf1 100644 --- a/lib/model_get_sms_campaigns.go +++ b/lib/model_get_sms_campaigns.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmsCampaigns struct { - Campaigns []AllOfgetSmsCampaignsCampaignsItems `json:"campaigns,omitempty"` + Campaigns []interface{} `json:"campaigns,omitempty"` // Number of SMS campaigns retrieved Count int64 `json:"count,omitempty"` } diff --git a/lib/model_get_sms_event_report.go b/lib/model_get_sms_event_report.go index c0a8cce..b7dc21d 100644 --- a/lib/model_get_sms_event_report.go +++ b/lib/model_get_sms_event_report.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmsEventReport struct { diff --git a/lib/model_get_sms_event_report_events.go b/lib/model_get_sms_event_report_events.go index 2999790..bf609e9 100644 --- a/lib/model_get_sms_event_report_events.go +++ b/lib/model_get_sms_event_report_events.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmsEventReportEvents struct { @@ -20,7 +21,7 @@ type GetSmsEventReportEvents struct { Event string `json:"event,omitempty"` // Reason of bounce (only available if the event is hardbounce or softbounce) Reason string `json:"reason,omitempty"` - Reply string `json:"reply,omitempty"` + Reply string `json:"reply,omitempty"` // Tag of the SMS which generated the event Tag string `json:"tag,omitempty"` } diff --git a/lib/model_get_smtp_template_overview.go b/lib/model_get_smtp_template_overview.go index c378f3f..42784a9 100644 --- a/lib/model_get_smtp_template_overview.go +++ b/lib/model_get_smtp_template_overview.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmtpTemplateOverview struct { @@ -19,8 +20,8 @@ type GetSmtpTemplateOverview struct { // Status of template (true=active, false=inactive) IsActive bool `json:"isActive"` // Status of test sending for the template (true=test email has been sent, false=test email has not been sent) - TestSent bool `json:"testSent"` - Sender *GetSmtpTemplateOverviewSender `json:"sender"` + TestSent bool `json:"testSent"` + Sender *GetSmtpTemplateOverviewSender `json:"sender"` // Email defined as the \"Reply to\" for the template ReplyTo string `json:"replyTo"` // Customisation of the \"to\" field for the template diff --git a/lib/model_get_smtp_template_overview_sender.go b/lib/model_get_smtp_template_overview_sender.go index eb2859e..2eeb56f 100644 --- a/lib/model_get_smtp_template_overview_sender.go +++ b/lib/model_get_smtp_template_overview_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmtpTemplateOverviewSender struct { diff --git a/lib/model_get_smtp_templates.go b/lib/model_get_smtp_templates.go index a25671d..85e39e4 100644 --- a/lib/model_get_smtp_templates.go +++ b/lib/model_get_smtp_templates.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSmtpTemplates struct { // Count of transactional email templates - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` Templates []GetSmtpTemplateOverview `json:"templates,omitempty"` } diff --git a/lib/model_get_sso_token.go b/lib/model_get_sso_token.go index 2282cfb..14b2082 100644 --- a/lib/model_get_sso_token.go +++ b/lib/model_get_sso_token.go @@ -1,15 +1,16 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetSsoToken struct { - // Session token. It will remain valid for a short period of time only. + // Session token, it will remain valid for 15 days. Token string `json:"token"` } diff --git a/lib/model_get_stats_by_browser.go b/lib/model_get_stats_by_browser.go new file mode 100644 index 0000000..1112ddf --- /dev/null +++ b/lib/model_get_stats_by_browser.go @@ -0,0 +1,14 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetStatsByBrowser struct { +} diff --git a/lib/model_get_stats_by_device.go b/lib/model_get_stats_by_device.go index d9dcbf6..2a2ba21 100644 --- a/lib/model_get_stats_by_device.go +++ b/lib/model_get_stats_by_device.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetStatsByDevice struct { diff --git a/lib/model_get_stats_by_domain.go b/lib/model_get_stats_by_domain.go new file mode 100644 index 0000000..7135147 --- /dev/null +++ b/lib/model_get_stats_by_domain.go @@ -0,0 +1,14 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type GetStatsByDomain struct { +} diff --git a/lib/model_get_transac_aggregated_sms_report.go b/lib/model_get_transac_aggregated_sms_report.go index 9e356bf..10c801f 100644 --- a/lib/model_get_transac_aggregated_sms_report.go +++ b/lib/model_get_transac_aggregated_sms_report.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacAggregatedSmsReport struct { diff --git a/lib/model_get_transac_blocked_contacts.go b/lib/model_get_transac_blocked_contacts.go index c111b84..00df113 100644 --- a/lib/model_get_transac_blocked_contacts.go +++ b/lib/model_get_transac_blocked_contacts.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacBlockedContacts struct { // Count of blocked or unsubscribed contact - Count int64 `json:"count,omitempty"` + Count int64 `json:"count,omitempty"` Contacts []GetTransacBlockedContactsContacts `json:"contacts,omitempty"` } diff --git a/lib/model_get_transac_blocked_contacts_contacts.go b/lib/model_get_transac_blocked_contacts_contacts.go index 36b093b..f2b082e 100644 --- a/lib/model_get_transac_blocked_contacts_contacts.go +++ b/lib/model_get_transac_blocked_contacts_contacts.go @@ -1,20 +1,21 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacBlockedContactsContacts struct { // Email address of the blocked or unsubscribed contact Email string `json:"email"` // Sender email address of the blocked or unsubscribed contact - SenderEmail string `json:"senderEmail"` - Reason *GetTransacBlockedContactsReason `json:"reason"` + SenderEmail string `json:"senderEmail"` + Reason *GetTransacBlockedContactsReason `json:"reason"` // Date when the contact was blocked or unsubscribed on BlockedAt string `json:"blockedAt"` } diff --git a/lib/model_get_transac_blocked_contacts_reason.go b/lib/model_get_transac_blocked_contacts_reason.go index f430c40..dd536e0 100644 --- a/lib/model_get_transac_blocked_contacts_reason.go +++ b/lib/model_get_transac_blocked_contacts_reason.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Reason for blocking / unsubscribing diff --git a/lib/model_get_transac_email_content.go b/lib/model_get_transac_email_content.go index 622aac4..8b305be 100644 --- a/lib/model_get_transac_email_content.go +++ b/lib/model_get_transac_email_content.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacEmailContent struct { diff --git a/lib/model_get_transac_email_content_events.go b/lib/model_get_transac_email_content_events.go index ce3c128..07cd48d 100644 --- a/lib/model_get_transac_email_content_events.go +++ b/lib/model_get_transac_email_content_events.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacEmailContentEvents struct { diff --git a/lib/model_get_transac_emails_list.go b/lib/model_get_transac_emails_list.go index 4d04fa8..6ec3556 100644 --- a/lib/model_get_transac_emails_list.go +++ b/lib/model_get_transac_emails_list.go @@ -1,14 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacEmailsList struct { + // Total number of transactional emails available on your account according to the passed filter + Count int64 `json:"count,omitempty"` TransactionalEmails []GetTransacEmailsListTransactionalEmails `json:"transactionalEmails,omitempty"` } diff --git a/lib/model_get_transac_emails_list_transactional_emails.go b/lib/model_get_transac_emails_list_transactional_emails.go index 4c3ce0a..72456f4 100644 --- a/lib/model_get_transac_emails_list_transactional_emails.go +++ b/lib/model_get_transac_emails_list_transactional_emails.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacEmailsListTransactionalEmails struct { diff --git a/lib/model_get_transac_sms_report.go b/lib/model_get_transac_sms_report.go index ea846ec..beca2b7 100644 --- a/lib/model_get_transac_sms_report.go +++ b/lib/model_get_transac_sms_report.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacSmsReport struct { diff --git a/lib/model_get_transac_sms_report_reports.go b/lib/model_get_transac_sms_report_reports.go index c88f8c1..7687258 100644 --- a/lib/model_get_transac_sms_report_reports.go +++ b/lib/model_get_transac_sms_report_reports.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetTransacSmsReportReports struct { diff --git a/lib/model_get_webhook.go b/lib/model_get_webhook.go index 278bb4c..4d27e3c 100644 --- a/lib/model_get_webhook.go +++ b/lib/model_get_webhook.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetWebhook struct { @@ -15,8 +16,8 @@ type GetWebhook struct { // ID of the webhook Id int64 `json:"id"` // Description of the webhook - Description string `json:"description"` - Events []string `json:"events"` + Description string `json:"description"` + Events []string `json:"events"` // Type of webhook (marketing or transac) Type_ string `json:"type"` // Creation UTC date-time of the webhook (YYYY-MM-DDTHH:mm:ss.SSSZ) diff --git a/lib/model_get_webhooks.go b/lib/model_get_webhooks.go index b764813..38bded7 100644 --- a/lib/model_get_webhooks.go +++ b/lib/model_get_webhooks.go @@ -1,14 +1,15 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type GetWebhooks struct { - Webhooks []AllOfgetWebhooksWebhooksItems `json:"webhooks"` + Webhooks []interface{} `json:"webhooks"` } diff --git a/lib/model_inline_response_200.go b/lib/model_inline_response_200.go new file mode 100644 index 0000000..0c5baf5 --- /dev/null +++ b/lib/model_inline_response_200.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Created company id +type InlineResponse200 struct { + // Unique company id + Id string `json:"id"` +} diff --git a/lib/model_inline_response_201.go b/lib/model_inline_response_201.go new file mode 100644 index 0000000..f936b5c --- /dev/null +++ b/lib/model_inline_response_201.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Created deal id +type InlineResponse201 struct { + // Unique deal id + Id string `json:"id"` +} diff --git a/lib/model_inline_response_201_1.go b/lib/model_inline_response_201_1.go new file mode 100644 index 0000000..479ee26 --- /dev/null +++ b/lib/model_inline_response_201_1.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Task Details +type InlineResponse2011 struct { + // Unique task id + Id string `json:"id"` +} diff --git a/lib/model_manage_ip.go b/lib/model_manage_ip.go index 91b4020..8ce3faf 100644 --- a/lib/model_manage_ip.go +++ b/lib/model_manage_ip.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type ManageIp struct { diff --git a/lib/model_master_details_response.go b/lib/model_master_details_response.go new file mode 100644 index 0000000..2719220 --- /dev/null +++ b/lib/model_master_details_response.go @@ -0,0 +1,26 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type MasterDetailsResponse struct { + // Email id of master account + Email string `json:"email,omitempty"` + // Company name of master account organization + CompanyName string `json:"companyName,omitempty"` + // Unique identifier of the master account organization + Id int64 `json:"id,omitempty"` + // Currency code of the master account organization + CurrencyCode string `json:"currencyCode,omitempty"` + // Timezone of the master account organization + Timezone string `json:"timezone,omitempty"` + BillingInfo *MasterDetailsResponseBillingInfo `json:"billingInfo,omitempty"` + PlanInfo *MasterDetailsResponsePlanInfo `json:"planInfo,omitempty"` +} diff --git a/lib/model_all_ofget_children_list_children_items.go b/lib/model_master_details_response_billing_info.go similarity index 68% rename from lib/model_all_ofget_children_list_children_items.go rename to lib/model_master_details_response_billing_info.go index cf53683..2fb9b74 100644 --- a/lib/model_all_ofget_children_list_children_items.go +++ b/lib/model_master_details_response_billing_info.go @@ -1,22 +1,21 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type AllOfgetChildrenListChildrenItems struct { - Credits *GetChildInfoCredits `json:"credits,omitempty"` - Statistics *GetChildInfoStatistics `json:"statistics,omitempty"` - // The encrypted password of child account - Password string `json:"password"` - // IP(s) associated to a child account user - Ips []string `json:"ips,omitempty"` - ApiKeys *GetChildInfoApiKeys `json:"apiKeys,omitempty"` - // ID of the child - Id int64 `json:"id,omitempty"` +// Billing details of the master account organization +type MasterDetailsResponseBillingInfo struct { + // Billing email id of master account + Email string `json:"email,omitempty"` + // Company name of master account + CompanyName string `json:"companyName,omitempty"` + Name *MasterDetailsResponseBillingInfoName `json:"name,omitempty"` + Address *MasterDetailsResponseBillingInfoAddress `json:"address,omitempty"` } diff --git a/lib/model_master_details_response_billing_info_address.go b/lib/model_master_details_response_billing_info_address.go new file mode 100644 index 0000000..9268b8b --- /dev/null +++ b/lib/model_master_details_response_billing_info_address.go @@ -0,0 +1,25 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Billing address of master account +type MasterDetailsResponseBillingInfoAddress struct { + // Street address + StreetAddress string `json:"streetAddress,omitempty"` + // Locality + Locality string `json:"locality,omitempty"` + // Postal code + PostalCode string `json:"postalCode,omitempty"` + // State code + StateCode string `json:"stateCode,omitempty"` + // Country code + CountryCode string `json:"countryCode,omitempty"` +} diff --git a/lib/model_master_details_response_billing_info_name.go b/lib/model_master_details_response_billing_info_name.go new file mode 100644 index 0000000..4a74447 --- /dev/null +++ b/lib/model_master_details_response_billing_info_name.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Billing name of master account holder +type MasterDetailsResponseBillingInfoName struct { + // First name for billing + GivenName string `json:"givenName,omitempty"` + // Last name for billing + FamilyName string `json:"familyName,omitempty"` +} diff --git a/lib/model_master_details_response_plan_info.go b/lib/model_master_details_response_plan_info.go new file mode 100644 index 0000000..ef3b5cc --- /dev/null +++ b/lib/model_master_details_response_plan_info.go @@ -0,0 +1,27 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Plan details +type MasterDetailsResponsePlanInfo struct { + // Plan currency + CurrencyCode string `json:"currencyCode,omitempty"` + // Timestamp of next billing date + NextBillingAt int64 `json:"nextBillingAt,omitempty"` + // Plan amount + Price float32 `json:"price,omitempty"` + // Plan period type + PlanPeriod string `json:"planPeriod,omitempty"` + // Number of sub-accounts + SubAccounts int32 `json:"subAccounts,omitempty"` + // List of provided features in the plan + Features []MasterDetailsResponsePlanInfoFeatures `json:"features,omitempty"` +} diff --git a/lib/model_all_ofget_folders_folders_items.go b/lib/model_master_details_response_plan_info_features.go similarity index 70% rename from lib/model_all_ofget_folders_folders_items.go rename to lib/model_master_details_response_plan_info_features.go index 4e7b2b5..3f1d3b7 100644 --- a/lib/model_all_ofget_folders_folders_items.go +++ b/lib/model_master_details_response_plan_info_features.go @@ -1,23 +1,24 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -type AllOfgetFoldersFoldersItems struct { - // ID of the folder - Id int64 `json:"id"` - // Name of the folder - Name string `json:"name"` - // Number of blacklisted contacts in the folder - TotalBlacklisted int64 `json:"totalBlacklisted"` - // Number of contacts in the folder - TotalSubscribers int64 `json:"totalSubscribers"` - // Number of unique contacts in the folder - UniqueSubscribers int64 `json:"uniqueSubscribers"` +type MasterDetailsResponsePlanInfoFeatures struct { + // Name of the feature + Name string `json:"name,omitempty"` + // Unit value of the feature + UnitValue string `json:"unitValue,omitempty"` + // Quantity provided in the plan + Quantity int64 `json:"quantity,omitempty"` + // Quantity consumed by master + Used int64 `json:"used,omitempty"` + // Quantity remaining in the plan + Remaining int64 `json:"remaining,omitempty"` } diff --git a/lib/model_note.go b/lib/model_note.go new file mode 100644 index 0000000..650115b --- /dev/null +++ b/lib/model_note.go @@ -0,0 +1,33 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +import ( + "time" +) + +// Note Details +type Note struct { + // Unique note Id + Id string `json:"id,omitempty"` + // Text content of a note + Text string `json:"text"` + // Contact ids linked to a note + ContactIds []int32 `json:"contactIds,omitempty"` + // Deal ids linked to a note + DealIds []string `json:"dealIds,omitempty"` + // Account details of user which created the note + AuthorId map[string]interface{} `json:"authorId,omitempty"` + // Note created date/time + CreatedAt time.Time `json:"createdAt,omitempty"` + // Note updated date/time + UpdatedAt time.Time `json:"updatedAt,omitempty"` +} diff --git a/lib/model_note_data.go b/lib/model_note_data.go new file mode 100644 index 0000000..64bc4ef --- /dev/null +++ b/lib/model_note_data.go @@ -0,0 +1,21 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Note data to be saved +type NoteData struct { + // Text content of a note + Text string `json:"text"` + // Contact Ids linked to a note + ContactIds []int32 `json:"contactIds,omitempty"` + // Deal Ids linked to a note + DealIds []string `json:"dealIds,omitempty"` +} diff --git a/lib/model_note_id.go b/lib/model_note_id.go new file mode 100644 index 0000000..a321d31 --- /dev/null +++ b/lib/model_note_id.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Updated Note ID +type NoteId struct { + // Unique note Id + Id string `json:"id,omitempty"` +} diff --git a/lib/model_note_list.go b/lib/model_note_list.go new file mode 100644 index 0000000..b06031e --- /dev/null +++ b/lib/model_note_list.go @@ -0,0 +1,15 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of notes +type NoteList struct { +} diff --git a/lib/model_pipeline.go b/lib/model_pipeline.go new file mode 100644 index 0000000..80ffc97 --- /dev/null +++ b/lib/model_pipeline.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of stages +type Pipeline struct { + // List of stages + Stages []PipelineStage `json:"stages,omitempty"` +} diff --git a/lib/model_pipeline_stage.go b/lib/model_pipeline_stage.go new file mode 100644 index 0000000..8078127 --- /dev/null +++ b/lib/model_pipeline_stage.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of stages +type PipelineStage struct { + // Stage id + Id string `json:"id,omitempty"` + // Stage name + Name string `json:"name,omitempty"` +} diff --git a/lib/model_post_contact_info.go b/lib/model_post_contact_info.go index e909549..f81afda 100644 --- a/lib/model_post_contact_info.go +++ b/lib/model_post_contact_info.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type PostContactInfo struct { diff --git a/lib/model_post_contact_info_contacts.go b/lib/model_post_contact_info_contacts.go index c16b0e1..421a7b6 100644 --- a/lib/model_post_contact_info_contacts.go +++ b/lib/model_post_contact_info_contacts.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type PostContactInfoContacts struct { diff --git a/lib/model_post_send_failed.go b/lib/model_post_send_failed.go index 1d42d71..fd04431 100644 --- a/lib/model_post_send_failed.go +++ b/lib/model_post_send_failed.go @@ -1,20 +1,21 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type PostSendFailed struct { // Response code Code int64 `json:"code"` // Response message - Message string `json:"message"` - UnexistingEmails []string `json:"unexistingEmails,omitempty"` + Message string `json:"message"` + UnexistingEmails []string `json:"unexistingEmails,omitempty"` WithoutListEmails []string `json:"withoutListEmails,omitempty"` BlackListedEmails []string `json:"blackListedEmails,omitempty"` } diff --git a/lib/model_post_send_sms_test_failed.go b/lib/model_post_send_sms_test_failed.go index bcb060c..b876f66 100644 --- a/lib/model_post_send_sms_test_failed.go +++ b/lib/model_post_send_sms_test_failed.go @@ -1,19 +1,20 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type PostSendSmsTestFailed struct { // Response code Code int64 `json:"code"` // Response message - Message string `json:"message"` - UnexistingSms []string `json:"unexistingSms,omitempty"` + Message string `json:"message"` + UnexistingSms []string `json:"unexistingSms,omitempty"` WithoutListSms []string `json:"withoutListSms,omitempty"` } diff --git a/lib/model_remaining_credit_model.go b/lib/model_remaining_credit_model.go index bd135d2..07f2ef7 100644 --- a/lib/model_remaining_credit_model.go +++ b/lib/model_remaining_credit_model.go @@ -1,15 +1,16 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RemainingCreditModel struct { - Child *RemainingCreditModelChild `json:"child"` + Child *RemainingCreditModelChild `json:"child"` Reseller *RemainingCreditModelReseller `json:"reseller"` } diff --git a/lib/model_remaining_credit_model_child.go b/lib/model_remaining_credit_model_child.go index 2a25b9d..7b6af56 100644 --- a/lib/model_remaining_credit_model_child.go +++ b/lib/model_remaining_credit_model_child.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Credits remaining for child account diff --git a/lib/model_remaining_credit_model_reseller.go b/lib/model_remaining_credit_model_reseller.go index e5a8149..ea293d0 100644 --- a/lib/model_remaining_credit_model_reseller.go +++ b/lib/model_remaining_credit_model_reseller.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RemainingCreditModelReseller struct { diff --git a/lib/model_remove_contact_from_list.go b/lib/model_remove_contact_from_list.go index 2be9c25..6347359 100644 --- a/lib/model_remove_contact_from_list.go +++ b/lib/model_remove_contact_from_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RemoveContactFromList struct { diff --git a/lib/model_remove_credits.go b/lib/model_remove_credits.go index 1bc2d4a..ffaedf2 100644 --- a/lib/model_remove_credits.go +++ b/lib/model_remove_credits.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RemoveCredits struct { diff --git a/lib/model_request_contact_export.go b/lib/model_request_contact_export.go index c1643f4..e28e225 100644 --- a/lib/model_request_contact_export.go +++ b/lib/model_request_contact_export.go @@ -1,20 +1,19 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RequestContactExport struct { // List of all the attributes that you want to export. These attributes must be present in your contact database. For example, ['fname', 'lname', 'email']. - ExportAttributes []string `json:"exportAttributes,omitempty"` - // This attribute has been deprecated and will be removed by January 1st, 2021. Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. For example, {\"blacklisted\":true} will export all the blacklisted contacts. - ContactFilter *interface{} `json:"contactFilter,omitempty"` - CustomContactFilter *RequestContactExportCustomContactFilter `json:"customContactFilter,omitempty"` + ExportAttributes []string `json:"exportAttributes,omitempty"` + CustomContactFilter *RequestContactExportCustomContactFilter `json:"customContactFilter"` // Webhook that will be called once the export process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 NotifyUrl string `json:"notifyUrl,omitempty"` } diff --git a/lib/model_request_contact_export_custom_contact_filter.go b/lib/model_request_contact_export_custom_contact_filter.go index 6ab5907..bf707bb 100644 --- a/lib/model_request_contact_export_custom_contact_filter.go +++ b/lib/model_request_contact_export_custom_contact_filter.go @@ -1,21 +1,22 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib -// Only one of the two filter options (contactFilter or customContactFilter) can be passed in the request. Set the filter for the contacts to be exported. +// Set the filter for the contacts to be exported. type RequestContactExportCustomContactFilter struct { - // Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. + // Mandatory if neither actionForEmailCampaigns nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on contacts as per the list id. * allContacts - Fetch the list of all contacts for a particular list. * subscribed & unsubscribed - Fetch the list of subscribed / unsubscribed (blacklisted via any means) contacts for a particular list. * unsubscribedPerList - Fetch the list of contacts that are unsubscribed from a particular list only. ActionForContacts string `json:"actionForContacts,omitempty"` - // Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). + // Mandatory if neither actionForContacts nor actionForSmsCampaigns is passed. This will export the contacts on the basis of provided action applied on email campaigns. * openers & nonOpeners - emailCampaignId is mandatory. Fetch the list of readers / non-readers for a particular email campaign. * clickers & nonClickers - emailCampaignId is mandatory. Fetch the list of clickers / non-clickers for a particular email campaign. * unsubscribed - emailCampaignId is mandatory. Fetch the list of all unsubscribed (blacklisted via any means) contacts for a particular email campaign. * hardBounces & softBounces - emailCampaignId is optional. Fetch the list of hard bounces / soft bounces for a particular / all email campaign(s). ActionForEmailCampaigns string `json:"actionForEmailCampaigns,omitempty"` - // Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. + // Mandatory if neither actionForContacts nor actionForEmailCampaigns is passed. This will export the contacts on the basis of provided action applied on sms campaigns. * unsubscribed - Fetch the list of all unsubscribed (blacklisted via any means) contacts for all / particular sms campaigns. * hardBounces & softBounces - Fetch the list of hard bounces / soft bounces for all / particular sms campaigns. ActionForSmsCampaigns string `json:"actionForSmsCampaigns,omitempty"` // Mandatory if actionForContacts is passed, ignored otherwise. Id of the list for which the corresponding action shall be applied in the filter. ListId int64 `json:"listId,omitempty"` diff --git a/lib/model_request_contact_import.go b/lib/model_request_contact_import.go index a698d5a..44ac892 100644 --- a/lib/model_request_contact_import.go +++ b/lib/model_request_contact_import.go @@ -1,24 +1,27 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RequestContactImport struct { - // Mandatory if fileBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv + // Mandatory if fileBody or jsonBody is not defined. URL of the file to be imported (no local file). Possible file formats: .txt, .csv, .json FileUrl string `json:"fileUrl,omitempty"` - // Mandatory if fileUrl is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. + // Mandatory if fileUrl and jsonBody is not defined. CSV content to be imported. Use semicolon to separate multiple attributes. Maximum allowed file body size is 10MB . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of file body size while parsing. Please use fileUrl instead to import bigger files. FileBody string `json:"fileBody,omitempty"` + // **Mandatory if fileUrl and fileBody is not defined.** JSON content to be imported. **Maximum allowed json body size is 10MB** . However we recommend a safe limit of around 8 MB to avoid the issues caused due to increase of json body size while parsing. Please use fileUrl instead to import bigger files. + JsonBody []map[string]interface{} `json:"jsonBody,omitempty"` // Mandatory if newList is not defined. Ids of the lists in which the contacts shall be imported. For example, [2, 4, 7]. ListIds []int64 `json:"listIds,omitempty"` // URL that will be called once the import process is finished. For reference, https://help.sendinblue.com/hc/en-us/articles/360007666479 - NotifyUrl string `json:"notifyUrl,omitempty"` - NewList *RequestContactImportNewList `json:"newList,omitempty"` + NotifyUrl string `json:"notifyUrl,omitempty"` + NewList *RequestContactImportNewList `json:"newList,omitempty"` // To blacklist all the contacts for email EmailBlacklist bool `json:"emailBlacklist,omitempty"` // To blacklist all the contacts for sms diff --git a/lib/model_request_contact_import_new_list.go b/lib/model_request_contact_import_new_list.go index 2e75607..c9290d4 100644 --- a/lib/model_request_contact_import_new_list.go +++ b/lib/model_request_contact_import_new_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // To create a new list and import the contacts into it, pass the listName and an optional folderId. diff --git a/lib/model_request_sms_recipient_export.go b/lib/model_request_sms_recipient_export.go index 57271b2..b141e68 100644 --- a/lib/model_request_sms_recipient_export.go +++ b/lib/model_request_sms_recipient_export.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type RequestSmsRecipientExport struct { diff --git a/lib/model_schedule_smtp_email.go b/lib/model_schedule_smtp_email.go new file mode 100644 index 0000000..13d1f2e --- /dev/null +++ b/lib/model_schedule_smtp_email.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type ScheduleSmtpEmail struct { + // Message ID of the transactional email scheduled + MessageId string `json:"messageId,omitempty"` + MessageIds []string `json:"messageIds,omitempty"` + // Batch ID of the batch transactional email scheduled + BatchId string `json:"batchId,omitempty"` +} diff --git a/lib/model_send_email.go b/lib/model_send_email.go deleted file mode 100644 index d15496c..0000000 --- a/lib/model_send_email.go +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SendinBlue API - * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | - * - * API version: 3.0.0 - * Contact: contact@sendinblue.com - * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) - */ -package lib - -type SendEmail struct { - // List of the email addresses of the recipients. For example, ['abc@example.com', 'asd@example.com']. - EmailTo []string `json:"emailTo"` - // List of the email addresses of the recipients in bcc - EmailBcc []string `json:"emailBcc,omitempty"` - // List of the email addresses of the recipients in cc - EmailCc []string `json:"emailCc,omitempty"` - // Email address which shall be used by campaign recipients to reply back - ReplyTo string `json:"replyTo,omitempty"` - // Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps - AttachmentUrl string `json:"attachmentUrl,omitempty"` - // Pass the list of content (base64 encoded) and name of the attachment. For example, [{\"content\":\"base64 encoded content 1\", \"name\":\"attcahment1\"}, {\"content\":\"base64 encoded content 2\", \"name\":\"attcahment2\"}]. - Attachment []SendEmailAttachment `json:"attachment,omitempty"` - // Pass the set of headers that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, {\"Content-Type\":\"text/html\", \"charset\":\"iso-8859-1\", \"sender.ip\":\"1.2.3.4\"} - Headers *interface{} `json:"headers,omitempty"` - // Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"} - Attributes *interface{} `json:"attributes,omitempty"` - // Tag your emails to find them more easily - Tags []string `json:"tags,omitempty"` -} diff --git a/lib/model_send_report.go b/lib/model_send_report.go index 2089be4..205ee6d 100644 --- a/lib/model_send_report.go +++ b/lib/model_send_report.go @@ -1,16 +1,17 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendReport struct { // Language of email content for campaign report sending. - Language string `json:"language,omitempty"` - Email *SendReportEmail `json:"email"` + Language string `json:"language,omitempty"` + Email *SendReportEmail `json:"email"` } diff --git a/lib/model_send_report_email.go b/lib/model_send_report_email.go index 3571a28..c014b5d 100644 --- a/lib/model_send_report_email.go +++ b/lib/model_send_report_email.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Custom attributes for the report email. diff --git a/lib/model_send_sms.go b/lib/model_send_sms.go index 3b97fbd..6d9a529 100644 --- a/lib/model_send_sms.go +++ b/lib/model_send_sms.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSms struct { Reference string `json:"reference"` - MessageId int64 `json:"messageId"` + MessageId int64 `json:"messageId"` // Count of SMS's to send multiple text messages SmsCount int64 `json:"smsCount,omitempty"` // SMS credits used per text message diff --git a/lib/model_send_smtp_email.go b/lib/model_send_smtp_email.go index 3990ce0..2289916 100644 --- a/lib/model_send_smtp_email.go +++ b/lib/model_send_smtp_email.go @@ -1,14 +1,19 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib +import ( + "time" +) + type SendSmtpEmail struct { Sender *SendSmtpEmailSender `json:"sender,omitempty"` // Mandatory if messageVersions are not passed, ignored if messageVersions are passed. List of email addresses and names (optional) of the recipients. For example, [{\"name\":\"Jimmy\", \"email\":\"jimmy98@example.com\"}, {\"name\":\"Joe\", \"email\":\"joe@example.com\"}] @@ -22,18 +27,22 @@ type SendSmtpEmail struct { // Plain Text body of the message ( Ignored if 'templateId' is passed ) TextContent string `json:"textContent,omitempty"` // Subject of the message. Mandatory if 'templateId' is not passed - Subject string `json:"subject,omitempty"` + Subject string `json:"subject,omitempty"` ReplyTo *SendSmtpEmailReplyTo `json:"replyTo,omitempty"` - // Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg and wmv ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) + // Pass the absolute URL (no local file) or the base64 content of the attachment along with the attachment name (Mandatory if attachment content is passed). For example, `[{\"url\":\"https://attachment.domain.com/myAttachmentFromUrl.jpg\", \"name\":\"myAttachmentFromUrl.jpg\"}, {\"content\":\"base64 example content\", \"name\":\"myAttachmentFromBase64.jpg\"}]`. Allowed extensions for attachment file: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub, eps, odt, mp3, m4a, m4v, wma, ogg, flac, wav, aif, aifc, aiff, mp4, mov, avi, mkv, mpeg, mpg, wmv, pkpass and xlsm ( If 'templateId' is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then 'attachment' is ignored ) Attachment []SendSmtpEmailAttachment `json:"attachment,omitempty"` - // Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\"}`. - Headers *interface{} `json:"headers,omitempty"` - // Id of the template. Mandatory if messageVersions are passed + // Pass the set of custom headers (not the standard headers) that shall be sent along the mail headers in the original email. 'sender.ip' header can be set (only for dedicated ip users) to mention the IP to be used for sending transactional emails. Headers are allowed in `This-Case-Only` (i.e. words separated by hyphen with first letter of each word in capital letter), they will be converted to such case styling if not in this format in the request payload. For example, `{\"sender.ip\":\"1.2.3.4\", \"X-Mailin-custom\":\"some_custom_header\", \"idempotencyKey\":\"abc-123\"}`. + Headers map[string]interface{} `json:"headers,omitempty"` + // Id of the template. TemplateId int64 `json:"templateId,omitempty"` // Pass the set of attributes to customize the template. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. It's considered only if template is in New Template Language format. - Params *interface{} `json:"params,omitempty"` - // You can customize and send out multiple versions of a templateId. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. This feature is currently in its beta version. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails + Params map[string]interface{} `json:"params,omitempty"` + // You can customize and send out multiple versions of a mail. templateId can be customized only if global parameter contains templateId. htmlContent and textContent can be customized only if any of the two, htmlContent or textContent, is present in global parameters. Some global parameters such as **to(mandatory), bcc, cc, replyTo, subject** can also be customized specific to each version. Total number of recipients in one API request must not exceed 2000. However, you can still pass upto 99 recipients maximum in one message version. The size of individual params in all the messageVersions shall not exceed 100 KB limit and that of cumulative params shall not exceed 1000 KB. You can follow this **step-by-step guide** on how to use **messageVersions** to batch send emails - https://developers.sendinblue.com/docs/batch-send-transactional-emails MessageVersions []SendSmtpEmailMessageVersions `json:"messageVersions,omitempty"` // Tag your emails to find them more easily Tags []string `json:"tags,omitempty"` + // UTC date-time on which the email has to schedule (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for scheduling. There can be an expected delay of +5 minutes in scheduled email delivery. **Please note this feature is currently a public beta**. + ScheduledAt time.Time `json:"scheduledAt,omitempty"` + // Valid UUIDv4 batch id to identify the scheduled batches transactional email. If not passed we will create a valid UUIDv4 batch id at our end. + BatchId string `json:"batchId,omitempty"` } diff --git a/lib/model_send_smtp_email_attachment.go b/lib/model_send_smtp_email_attachment.go index 6132e81..289e0af 100644 --- a/lib/model_send_smtp_email_attachment.go +++ b/lib/model_send_smtp_email_attachment.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSmtpEmailAttachment struct { diff --git a/lib/model_send_smtp_email_bcc.go b/lib/model_send_smtp_email_bcc.go index ab8776d..ec6f91c 100644 --- a/lib/model_send_smtp_email_bcc.go +++ b/lib/model_send_smtp_email_bcc.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSmtpEmailBcc struct { diff --git a/lib/model_send_smtp_email_cc.go b/lib/model_send_smtp_email_cc.go index 0cab153..30b75c6 100644 --- a/lib/model_send_smtp_email_cc.go +++ b/lib/model_send_smtp_email_cc.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSmtpEmailCc struct { diff --git a/lib/model_send_smtp_email_message_versions.go b/lib/model_send_smtp_email_message_versions.go index 1983f41..ada331a 100644 --- a/lib/model_send_smtp_email_message_versions.go +++ b/lib/model_send_smtp_email_message_versions.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSmtpEmailMessageVersions struct { @@ -17,8 +18,8 @@ type SendSmtpEmailMessageVersions struct { // List of email addresses and names (optional) of the recipients in bcc Bcc []SendSmtpEmailBcc `json:"bcc,omitempty"` // List of email addresses and names (optional) of the recipients in cc - Cc []SendSmtpEmailCc `json:"cc,omitempty"` + Cc []SendSmtpEmailCc `json:"cc,omitempty"` ReplyTo *SendSmtpEmailReplyTo1 `json:"replyTo,omitempty"` - // Custom subject specific to message version + // Custom subject specific to message version Subject string `json:"subject,omitempty"` } diff --git a/lib/model_send_smtp_email_reply_to.go b/lib/model_send_smtp_email_reply_to.go index b1f9c33..2a7e821 100644 --- a/lib/model_send_smtp_email_reply_to.go +++ b/lib/model_send_smtp_email_reply_to.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"}. diff --git a/lib/model_send_smtp_email_reply_to_1.go b/lib/model_send_smtp_email_reply_to_1.go index 0fac505..798a431 100644 --- a/lib/model_send_smtp_email_reply_to_1.go +++ b/lib/model_send_smtp_email_reply_to_1.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Email (required), along with name (optional), on which transactional mail recipients will be able to reply back. For example, {\"email\":\"ann6533@example.com\", \"name\":\"Ann\"} diff --git a/lib/model_send_smtp_email_sender.go b/lib/model_send_smtp_email_sender.go index 16778f1..2e9a638 100644 --- a/lib/model_send_smtp_email_sender.go +++ b/lib/model_send_smtp_email_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Mandatory if `templateId` is not passed. Pass `name` (optional) and `email` OR `id` of sender from which emails will be sent. `name` will be ignored if passed along with sender `id`. For example, {\"name\":\"Mary from MyShop\", \"email\":\"no-reply@myshop.com\"} or {\"id\":2} diff --git a/lib/model_send_smtp_email_to.go b/lib/model_send_smtp_email_to.go index a4d6875..167edee 100644 --- a/lib/model_send_smtp_email_to.go +++ b/lib/model_send_smtp_email_to.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSmtpEmailTo struct { diff --git a/lib/model_send_smtp_email_to_1.go b/lib/model_send_smtp_email_to_1.go index a1f1d74..77f7d6d 100644 --- a/lib/model_send_smtp_email_to_1.go +++ b/lib/model_send_smtp_email_to_1.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendSmtpEmailTo1 struct { diff --git a/lib/model_send_test_email.go b/lib/model_send_test_email.go index 6f2074c..754f67e 100644 --- a/lib/model_send_test_email.go +++ b/lib/model_send_test_email.go @@ -1,15 +1,16 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendTestEmail struct { - // List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. + // List of the email addresses of the recipients whom you wish to send the test mail. If left empty, the test mail will be sent to your entire test list. You can not send more than 50 test emails per day. EmailTo []string `json:"emailTo,omitempty"` } diff --git a/lib/model_send_test_sms.go b/lib/model_send_test_sms.go index 966fc9a..043703e 100644 --- a/lib/model_send_test_sms.go +++ b/lib/model_send_test_sms.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendTestSms struct { diff --git a/lib/model_send_transac_sms.go b/lib/model_send_transac_sms.go index ff12b0c..67e8d58 100644 --- a/lib/model_send_transac_sms.go +++ b/lib/model_send_transac_sms.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type SendTransacSms struct { @@ -22,4 +23,6 @@ type SendTransacSms struct { Tag string `json:"tag,omitempty"` // Webhook to call for each event triggered by the message (delivered etc.) WebUrl string `json:"webUrl,omitempty"` + // Format of the message. It indicates whether the content should be treated as unicode or not. + UnicodeEnabled bool `json:"unicodeEnabled,omitempty"` } diff --git a/lib/model_sso_token_request.go b/lib/model_sso_token_request.go new file mode 100644 index 0000000..2e3e2ff --- /dev/null +++ b/lib/model_sso_token_request.go @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type SsoTokenRequest struct { + // Id of the sub-account organization + Id int64 `json:"id"` + // User email of sub-account organization + Email string `json:"email,omitempty"` +} diff --git a/lib/model_sub_account_details_response.go b/lib/model_sub_account_details_response.go new file mode 100644 index 0000000..7f80eb1 --- /dev/null +++ b/lib/model_sub_account_details_response.go @@ -0,0 +1,21 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type SubAccountDetailsResponse struct { + // Name of the sub-account user + Name string `json:"name,omitempty"` + // Email id of the sub-account organization + Email string `json:"email,omitempty"` + // Sub-account company name + CompanyName string `json:"companyName,omitempty"` + PlanInfo *SubAccountDetailsResponsePlanInfo `json:"planInfo,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info.go b/lib/model_sub_account_details_response_plan_info.go new file mode 100644 index 0000000..2a16682 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Sub-account plan details +type SubAccountDetailsResponsePlanInfo struct { + Credits *SubAccountDetailsResponsePlanInfoCredits `json:"credits,omitempty"` + Features *SubAccountDetailsResponsePlanInfoFeatures `json:"features,omitempty"` + // type of the plan + PlanType string `json:"planType,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_credits.go b/lib/model_sub_account_details_response_plan_info_credits.go new file mode 100644 index 0000000..39a6483 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_credits.go @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Credits quota and remaining credits on the sub-account +type SubAccountDetailsResponsePlanInfoCredits struct { + // SMS credits remaining on the sub-account + Sms int64 `json:"sms,omitempty"` + Emails *SubAccountDetailsResponsePlanInfoCreditsEmails `json:"emails,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_credits_emails.go b/lib/model_sub_account_details_response_plan_info_credits_emails.go new file mode 100644 index 0000000..32d8e0f --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_credits_emails.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Email credits remaining on the sub-account +type SubAccountDetailsResponsePlanInfoCreditsEmails struct { + // Quantity of email messaging limits provided + Quantity int64 `json:"quantity,omitempty"` + // Available email messaging limits for use + Remaining int64 `json:"remaining,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_features.go b/lib/model_sub_account_details_response_plan_info_features.go new file mode 100644 index 0000000..237baa4 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_features.go @@ -0,0 +1,18 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Features available on the sub-account +type SubAccountDetailsResponsePlanInfoFeatures struct { + Inbox *SubAccountDetailsResponsePlanInfoFeaturesInbox `json:"inbox,omitempty"` + LandingPage *SubAccountDetailsResponsePlanInfoFeaturesLandingPage `json:"landingPage,omitempty"` + Users *SubAccountDetailsResponsePlanInfoFeaturesUsers `json:"users,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_features_inbox.go b/lib/model_sub_account_details_response_plan_info_features_inbox.go new file mode 100644 index 0000000..e3e1380 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_features_inbox.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Inbox details +type SubAccountDetailsResponsePlanInfoFeaturesInbox struct { + // Quantity of inbox provided + Quantity int64 `json:"quantity,omitempty"` + // Available inboxes for use + Remaining int64 `json:"remaining,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_features_landing_page.go b/lib/model_sub_account_details_response_plan_info_features_landing_page.go new file mode 100644 index 0000000..a602b69 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_features_landing_page.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Landing page details +type SubAccountDetailsResponsePlanInfoFeaturesLandingPage struct { + // Quantity of landing pages provided + Quantity int64 `json:"quantity,omitempty"` + // Available landing pages for use + Remaining int64 `json:"remaining,omitempty"` +} diff --git a/lib/model_sub_account_details_response_plan_info_features_users.go b/lib/model_sub_account_details_response_plan_info_features_users.go new file mode 100644 index 0000000..4602742 --- /dev/null +++ b/lib/model_sub_account_details_response_plan_info_features_users.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Multi-account details +type SubAccountDetailsResponsePlanInfoFeaturesUsers struct { + // Quantity of multi-account's provided + Quantity int64 `json:"quantity,omitempty"` + // Available multi-accounts for use + Remaining int64 `json:"remaining,omitempty"` +} diff --git a/lib/model_sub_account_update_plan_request.go b/lib/model_sub_account_update_plan_request.go new file mode 100644 index 0000000..6f281d2 --- /dev/null +++ b/lib/model_sub_account_update_plan_request.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Details of the plan to be changed +type SubAccountUpdatePlanRequest struct { + Credits *SubAccountUpdatePlanRequestCredits `json:"credits,omitempty"` + Features *SubAccountUpdatePlanRequestFeatures `json:"features,omitempty"` +} diff --git a/lib/model_sub_account_update_plan_request_credits.go b/lib/model_sub_account_update_plan_request_credits.go new file mode 100644 index 0000000..3408514 --- /dev/null +++ b/lib/model_sub_account_update_plan_request_credits.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Credit details to update +type SubAccountUpdatePlanRequestCredits struct { + // Number of email credits + Email int64 `json:"email,omitempty"` +} diff --git a/lib/model_sub_account_update_plan_request_features.go b/lib/model_sub_account_update_plan_request_features.go new file mode 100644 index 0000000..4001351 --- /dev/null +++ b/lib/model_sub_account_update_plan_request_features.go @@ -0,0 +1,21 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Features details to update +type SubAccountUpdatePlanRequestFeatures struct { + // Number of multi-users + Users int64 `json:"users,omitempty"` + // Number of landing pages + LandingPage int64 `json:"landingPage,omitempty"` + // Number of inboxes + Inbox int64 `json:"inbox,omitempty"` +} diff --git a/lib/model_sub_accounts_response.go b/lib/model_sub_accounts_response.go new file mode 100644 index 0000000..6afa61f --- /dev/null +++ b/lib/model_sub_accounts_response.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type SubAccountsResponse struct { + // Total number of subaccounts + Count int32 `json:"count,omitempty"` + SubAccounts []SubAccountsResponseSubAccounts `json:"subAccounts,omitempty"` +} diff --git a/lib/model_sub_accounts_response_sub_accounts.go b/lib/model_sub_accounts_response_sub_accounts.go new file mode 100644 index 0000000..3b540e0 --- /dev/null +++ b/lib/model_sub_accounts_response_sub_accounts.go @@ -0,0 +1,22 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type SubAccountsResponseSubAccounts struct { + // id of the sub-account + Id int64 `json:"id"` + // Name of the sub-account company + CompanyName string `json:"companyName"` + // Whether the sub-account is active or not + Active bool `json:"active"` + // Timestamp when the sub-account was created + CreatedAt int64 `json:"createdAt"` +} diff --git a/lib/model_task.go b/lib/model_task.go new file mode 100644 index 0000000..8006d1e --- /dev/null +++ b/lib/model_task.go @@ -0,0 +1,27 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Task Details +type Task struct { + // Unique task id + Id string `json:"id,omitempty"` + // Id for type of task e.g Call / Email / Meeting etc. + TaskTypeId string `json:"taskTypeId"` + // Name of task + Name string `json:"name"` + // Contact ids for contacts linked to this task + ContactsIds []int32 `json:"contactsIds,omitempty"` + // Deal ids for deals a task is linked to + DealsIds []string `json:"dealsIds,omitempty"` + // Companies ids for companies a task is linked to + CompaniesIds []string `json:"companiesIds,omitempty"` +} diff --git a/lib/model_task_list.go b/lib/model_task_list.go new file mode 100644 index 0000000..d657ac8 --- /dev/null +++ b/lib/model_task_list.go @@ -0,0 +1,17 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// List of tasks +type TaskList struct { + // List of tasks + Items []Task `json:"items,omitempty"` +} diff --git a/lib/model_task_reminder.go b/lib/model_task_reminder.go new file mode 100644 index 0000000..ca8b3f7 --- /dev/null +++ b/lib/model_task_reminder.go @@ -0,0 +1,21 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Task reminder date/time for a task +type TaskReminder struct { + // Value of time unit before reminder is to be sent + Value int32 `json:"value"` + // Unit of time before reminder is to be sent + Unit string `json:"unit"` + // Type of task reminder e.g email, push + Types []string `json:"types"` +} diff --git a/lib/model_task_types.go b/lib/model_task_types.go new file mode 100644 index 0000000..aaa5cdc --- /dev/null +++ b/lib/model_task_types.go @@ -0,0 +1,19 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +// Task types details +type TaskTypes struct { + // Id of task type + Id string `json:"id,omitempty"` + // Title of task type + Title string `json:"title,omitempty"` +} diff --git a/lib/model_update_attribute.go b/lib/model_update_attribute.go index 2eccc93..9a89cc5 100644 --- a/lib/model_update_attribute.go +++ b/lib/model_update_attribute.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateAttribute struct { diff --git a/lib/model_update_attribute_enumeration.go b/lib/model_update_attribute_enumeration.go index a0536fa..3d55270 100644 --- a/lib/model_update_attribute_enumeration.go +++ b/lib/model_update_attribute_enumeration.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateAttributeEnumeration struct { diff --git a/lib/model_update_batch_contacts.go b/lib/model_update_batch_contacts.go new file mode 100644 index 0000000..0944784 --- /dev/null +++ b/lib/model_update_batch_contacts.go @@ -0,0 +1,16 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type UpdateBatchContacts struct { + // List of contacts to be updated + Contacts []UpdateBatchContactsContacts `json:"contacts,omitempty"` +} diff --git a/lib/model_update_batch_contacts_contacts.go b/lib/model_update_batch_contacts_contacts.go new file mode 100644 index 0000000..b06dd87 --- /dev/null +++ b/lib/model_update_batch_contacts_contacts.go @@ -0,0 +1,32 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type UpdateBatchContactsContacts struct { + // Email address of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + Email string `json:"email,omitempty"` + // id of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + Id int64 `json:"id,omitempty"` + // SMS of the user to be updated (For each operation only pass one of the supported contact identifiers. Email, id or sms) + Sms string `json:"sms,omitempty"` + // Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, **{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}**. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"}** + Attributes map[string]interface{} `json:"attributes,omitempty"` + // Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) + EmailBlacklisted bool `json:"emailBlacklisted,omitempty"` + // Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) + SmsBlacklisted bool `json:"smsBlacklisted,omitempty"` + // Ids of the lists to add the contact to + ListIds []int64 `json:"listIds,omitempty"` + // Ids of the lists to remove the contact from + UnlinkListIds []int64 `json:"unlinkListIds,omitempty"` + // transactional email forbidden sender for contact. Use only for email Contact + SmtpBlacklistSender []string `json:"smtpBlacklistSender,omitempty"` +} diff --git a/lib/model_update_batch_contacts_model.go b/lib/model_update_batch_contacts_model.go new file mode 100644 index 0000000..5ed7d12 --- /dev/null +++ b/lib/model_update_batch_contacts_model.go @@ -0,0 +1,16 @@ +/* + * SendinBlue API + * + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * + * API version: 3.0.0 + * Contact: contact@sendinblue.com + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package lib + +type UpdateBatchContactsModel struct { + SuccessIds []int64 `json:"successIds,omitempty"` + FailureIds []int64 `json:"failureIds,omitempty"` +} diff --git a/lib/model_update_campaign_status.go b/lib/model_update_campaign_status.go index bcb4035..9dee606 100644 --- a/lib/model_update_campaign_status.go +++ b/lib/model_update_campaign_status.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Status of the campaign diff --git a/lib/model_update_child.go b/lib/model_update_child.go index 93bc9e7..03d9ce4 100644 --- a/lib/model_update_child.go +++ b/lib/model_update_child.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateChild struct { diff --git a/lib/model_update_child_account_status.go b/lib/model_update_child_account_status.go index 3aa8950..6c0f7da 100644 --- a/lib/model_update_child_account_status.go +++ b/lib/model_update_child_account_status.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateChildAccountStatus struct { diff --git a/lib/model_update_child_domain.go b/lib/model_update_child_domain.go index f3a890d..1f3d2ac 100644 --- a/lib/model_update_child_domain.go +++ b/lib/model_update_child_domain.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateChildDomain struct { diff --git a/lib/model_update_contact.go b/lib/model_update_contact.go index 23391cf..3c4df30 100644 --- a/lib/model_update_contact.go +++ b/lib/model_update_contact.go @@ -1,17 +1,18 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateContact struct { - // Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attribtes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} - Attributes *interface{} `json:"attributes,omitempty"` + // Pass the set of attributes to be updated. These attributes must be present in your account. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, `{ \"EMAIL\":\"newemail@domain.com\", \"FNAME\":\"Ellie\", \"LNAME\":\"Roger\"}`. The attribute's parameter should be passed in capital letter while updating a contact. Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in \"SMS\" field should be passed with proper country code. For example {\"SMS\":\"+91xxxxxxxxxx\"} or {\"SMS\":\"0091xxxxxxxxxx\"} + Attributes map[string]interface{} `json:"attributes,omitempty"` // Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) EmailBlacklisted bool `json:"emailBlacklisted,omitempty"` // Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) diff --git a/lib/model_update_email_campaign.go b/lib/model_update_email_campaign.go index 5e4c20f..5ebe796 100644 --- a/lib/model_update_email_campaign.go +++ b/lib/model_update_email_campaign.go @@ -1,21 +1,22 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateEmailCampaign struct { // Tag of the campaign - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *UpdateEmailCampaignSender `json:"sender,omitempty"` // Name of the campaign Name string `json:"name,omitempty"` - // Body of the message (HTML version). REQUIRED if htmlUrl is empty + // Body of the message (HTML version). If the campaign is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that campaign. REQUIRED if htmlUrl is empty HtmlContent string `json:"htmlContent,omitempty"` // Url which contents the body of the email message. REQUIRED if htmlContent is empty HtmlUrl string `json:"htmlUrl,omitempty"` @@ -26,7 +27,7 @@ type UpdateEmailCampaign struct { // Email on which campaign recipients will be able to reply to ReplyTo string `json:"replyTo,omitempty"` // To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization - ToField string `json:"toField,omitempty"` + ToField string `json:"toField,omitempty"` Recipients *UpdateEmailCampaignRecipients `json:"recipients,omitempty"` // Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps AttachmentUrl string `json:"attachmentUrl,omitempty"` @@ -43,7 +44,7 @@ type UpdateEmailCampaign struct { // Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed UtmCampaign string `json:"utmCampaign,omitempty"` // Pass the set of attributes to customize the type 'classic' campaign. For example, {\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}. The 'params' field will get updated, only if the campaign is in New Template Language, else ignored. The New Template Language is dependent on the values of 'subject', 'htmlContent/htmlUrl', 'sender.name' & 'toField' - Params *interface{} `json:"params,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` // Set this to true if you want to send your campaign at best time. Note:- if true, warmup ip will be disabled. SendAtBestTime bool `json:"sendAtBestTime,omitempty"` // Status of A/B Test. abTesting = false means it is disabled, & abTesting = true means it is enabled. 'subjectA', 'subjectB', 'splitRule', 'winnerCriteria' & 'winnerDelay' will be considered if abTesting is set to true. 'subject' if passed is ignored. Can be set to true only if 'sendAtBestTime' is 'false'. You will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B diff --git a/lib/model_update_email_campaign_recipients.go b/lib/model_update_email_campaign_recipients.go index e5ea4c0..25170f4 100644 --- a/lib/model_update_email_campaign_recipients.go +++ b/lib/model_update_email_campaign_recipients.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // List ids to include/exclude from campaign diff --git a/lib/model_update_email_campaign_sender.go b/lib/model_update_email_campaign_sender.go index 98fcc61..0417961 100644 --- a/lib/model_update_email_campaign_sender.go +++ b/lib/model_update_email_campaign_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` diff --git a/lib/model_update_list.go b/lib/model_update_list.go index 37eb373..c371d9a 100644 --- a/lib/model_update_list.go +++ b/lib/model_update_list.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateList struct { diff --git a/lib/model_update_sender.go b/lib/model_update_sender.go index 1b8cce5..1b16b1b 100644 --- a/lib/model_update_sender.go +++ b/lib/model_update_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateSender struct { diff --git a/lib/model_update_sms_campaign.go b/lib/model_update_sms_campaign.go index 469cc39..d939613 100644 --- a/lib/model_update_sms_campaign.go +++ b/lib/model_update_sms_campaign.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateSmsCampaign struct { @@ -15,8 +16,10 @@ type UpdateSmsCampaign struct { // Name of the sender. **The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters** Sender string `json:"sender,omitempty"` // Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS - Content string `json:"content,omitempty"` + Content string `json:"content,omitempty"` Recipients *CreateSmsCampaignRecipients `json:"recipients,omitempty"` // UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. ScheduledAt string `json:"scheduledAt,omitempty"` + // Format of the message. It indicates whether the content should be treated as unicode or not. + UnicodeEnabled bool `json:"unicodeEnabled,omitempty"` } diff --git a/lib/model_update_smtp_template.go b/lib/model_update_smtp_template.go index 4bdde4c..db84c9f 100644 --- a/lib/model_update_smtp_template.go +++ b/lib/model_update_smtp_template.go @@ -1,21 +1,22 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateSmtpTemplate struct { // Tag of the template - Tag string `json:"tag,omitempty"` + Tag string `json:"tag,omitempty"` Sender *UpdateSmtpTemplateSender `json:"sender,omitempty"` // Name of the template TemplateName string `json:"templateName,omitempty"` - // Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + // Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters) HtmlContent string `json:"htmlContent,omitempty"` // Required if htmlContent is empty. URL to the body of the email (HTML) HtmlUrl string `json:"htmlUrl,omitempty"` diff --git a/lib/model_update_smtp_template_sender.go b/lib/model_update_smtp_template_sender.go index 87f41cc..bc4b03c 100644 --- a/lib/model_update_smtp_template_sender.go +++ b/lib/model_update_smtp_template_sender.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib // Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{\"name\":\"xyz\", \"email\":\"example@abc.com\"}` , `{\"name\":\"xyz\", \"id\":123}` diff --git a/lib/model_update_webhook.go b/lib/model_update_webhook.go index e30f04b..ef8b8c1 100644 --- a/lib/model_update_webhook.go +++ b/lib/model_update_webhook.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UpdateWebhook struct { @@ -14,6 +15,8 @@ type UpdateWebhook struct { Url string `json:"url,omitempty"` // Description of the webhook Description string `json:"description,omitempty"` - // Events triggering the webhook. Possible values for Transactional type webhook – `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` and possible values for Marketing type webhook – `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` and `delivered` + // - Events triggering the webhook. Possible values for **Transactional** type webhook: #### `sent` OR `request`, `delivered`, `hardBounce`, `softBounce`, `blocked`, `spam`, `invalid`, `deferred`, `click`, `opened`, `uniqueOpened` and `unsubscribed` - Possible values for **Marketing** type webhook: #### `spam`, `opened`, `click`, `hardBounce`, `softBounce`, `unsubscribed`, `listAddition` & `delivered` - Possible values for **Inbound** type webhook: #### `inboundEmailProcessed` Events []string `json:"events,omitempty"` + // Inbound domain of webhook, used in case of event type `inbound` + Domain string `json:"domain,omitempty"` } diff --git a/lib/model_upload_image_to_gallery.go b/lib/model_upload_image_to_gallery.go index 2198f49..3fcfe08 100644 --- a/lib/model_upload_image_to_gallery.go +++ b/lib/model_upload_image_to_gallery.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib type UploadImageToGallery struct { diff --git a/lib/response.go b/lib/response.go index 1b50376..c22c40b 100644 --- a/lib/response.go +++ b/lib/response.go @@ -1,12 +1,13 @@ /* * SendinBlue API * - * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/sendinblue **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | * * API version: 3.0.0 * Contact: contact@sendinblue.com * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ + package lib import (