diff --git a/README.md b/README.md index ad0738f0..8ec60259 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,9 @@ Class | Method | HTTP request | Description *TransactionalEmailsApi* | [**getAggregatedSmtpReport**](docs/Api/TransactionalEmailsApi.md#getaggregatedsmtpreport) | **GET** /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time *TransactionalEmailsApi* | [**getBlockedDomains**](docs/Api/TransactionalEmailsApi.md#getblockeddomains) | **GET** /smtp/blockedDomains | Get the list of blocked domains *TransactionalEmailsApi* | [**getEmailEventReport**](docs/Api/TransactionalEmailsApi.md#getemaileventreport) | **GET** /smtp/statistics/events | Get all your transactional email activity (unaggregated events) +*TransactionalEmailsApi* | [**getScheduledEmailByBatchId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbybatchid) | **GET** /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId +*TransactionalEmailsApi* | [**getScheduledEmailById**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbyid) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId +*TransactionalEmailsApi* | [**getScheduledEmailByMessageId**](docs/Api/TransactionalEmailsApi.md#getscheduledemailbymessageid) | **GET** /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId *TransactionalEmailsApi* | [**getSmtpReport**](docs/Api/TransactionalEmailsApi.md#getsmtpreport) | **GET** /smtp/statistics/reports | Get your transactional email activity aggregated per day *TransactionalEmailsApi* | [**getSmtpTemplate**](docs/Api/TransactionalEmailsApi.md#getsmtptemplate) | **GET** /smtp/templates/{templateId} | Returns the template information *TransactionalEmailsApi* | [**getSmtpTemplates**](docs/Api/TransactionalEmailsApi.md#getsmtptemplates) | **GET** /smtp/templates | Get the list of email templates @@ -261,6 +264,7 @@ Class | Method | HTTP request | Description - [CreateSmtpTemplate](docs/Model/CreateSmtpTemplate.md) - [CreateSmtpTemplateSender](docs/Model/CreateSmtpTemplateSender.md) - [CreateSubAccount](docs/Model/CreateSubAccount.md) + - [CreateSubAccountResponse](docs/Model/CreateSubAccountResponse.md) - [CreateUpdateContactModel](docs/Model/CreateUpdateContactModel.md) - [CreateUpdateFolder](docs/Model/CreateUpdateFolder.md) - [CreateWebhook](docs/Model/CreateWebhook.md) @@ -333,6 +337,9 @@ Class | Method | HTTP request | Description - [GetProcesses](docs/Model/GetProcesses.md) - [GetReports](docs/Model/GetReports.md) - [GetReportsReports](docs/Model/GetReportsReports.md) + - [GetScheduledEmailByBatchId](docs/Model/GetScheduledEmailByBatchId.md) + - [GetScheduledEmailByBatchIdBatches](docs/Model/GetScheduledEmailByBatchIdBatches.md) + - [GetScheduledEmailByMessageId](docs/Model/GetScheduledEmailByMessageId.md) - [GetSendersList](docs/Model/GetSendersList.md) - [GetSendersListIps](docs/Model/GetSendersListIps.md) - [GetSendersListSenders](docs/Model/GetSendersListSenders.md) @@ -361,6 +368,7 @@ Class | Method | HTTP request | Description - [GetTransacSmsReportReports](docs/Model/GetTransacSmsReportReports.md) - [GetWebhook](docs/Model/GetWebhook.md) - [GetWebhooks](docs/Model/GetWebhooks.md) + - [InlineResponse201](docs/Model/InlineResponse201.md) - [ManageIp](docs/Model/ManageIp.md) - [MasterDetailsResponse](docs/Model/MasterDetailsResponse.md) - [MasterDetailsResponseBillingInfo](docs/Model/MasterDetailsResponseBillingInfo.md) diff --git a/docs/Api/CRMApi.md b/docs/Api/CRMApi.md index 13a47c59..eec1fc5c 100644 --- a/docs/Api/CRMApi.md +++ b/docs/Api/CRMApi.md @@ -649,7 +649,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) # **crmTasksPost** -> \SendinBlue\Client\Model\Task crmTasksPost($body) +> \SendinBlue\Client\Model\InlineResponse201 crmTasksPost($body) Create a task @@ -692,7 +692,7 @@ Name | Type | Description | Notes ### Return type -[**\SendinBlue\Client\Model\Task**](../Model/Task.md) +[**\SendinBlue\Client\Model\InlineResponse201**](../Model/InlineResponse201.md) ### Authorization diff --git a/docs/Api/MasterAccountApi.md b/docs/Api/MasterAccountApi.md index 8a67fa76..14a6045d 100644 --- a/docs/Api/MasterAccountApi.md +++ b/docs/Api/MasterAccountApi.md @@ -95,7 +95,7 @@ $apiInstance = new SendinBlue\Client\Api\MasterAccountApi( new GuzzleHttp\Client(), $config ); -$offset = 56; // int | Page number of sub-accounts listing +$offset = 56; // int | Index of the first sub-account in the page $limit = 56; // int | Number of sub-accounts to be displayed on each page try { @@ -111,7 +111,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **offset** | **int**| Page number of sub-accounts listing | + **offset** | **int**| Index of the first sub-account in the page | **limit** | **int**| Number of sub-accounts to be displayed on each page | ### Return type @@ -190,7 +190,7 @@ void (empty response body) Get sub-account details -This endpoint will provide the details of specified sub-account organization +This endpoint will provide the details for the specified sub-account company ### Example ```php @@ -305,7 +305,7 @@ void (empty response body) [[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** -> \SendinBlue\Client\Model\CreateModel corporateSubAccountPost($subAccountCreate) +> \SendinBlue\Client\Model\CreateSubAccountResponse corporateSubAccountPost($subAccountCreate) Create a new sub-account under a master account. @@ -350,7 +350,7 @@ Name | Type | Description | Notes ### Return type -[**\SendinBlue\Client\Model\CreateModel**](../Model/CreateModel.md) +[**\SendinBlue\Client\Model\CreateSubAccountResponse**](../Model/CreateSubAccountResponse.md) ### Authorization @@ -368,7 +368,7 @@ Name | Type | Description | Notes 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 with actual token. +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. ### Example ```php diff --git a/docs/Api/TransactionalEmailsApi.md b/docs/Api/TransactionalEmailsApi.md index 5083ee13..64feea27 100644 --- a/docs/Api/TransactionalEmailsApi.md +++ b/docs/Api/TransactionalEmailsApi.md @@ -12,6 +12,9 @@ Method | HTTP request | Description [**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 +[**getScheduledEmailById**](TransactionalEmailsApi.md#getScheduledEmailById) | **DELETE** /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId +[**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 @@ -511,6 +514,198 @@ 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) +# **getScheduledEmailByBatchId** +> \SendinBlue\Client\Model\GetScheduledEmailByBatchId getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset) + +Fetch scheduled emails by batchId + +Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$batchId = "batchId_example"; // string | The batchId of scheduled emails batch (Should be a valid UUIDv4) +$startDate = new \DateTime("2013-10-20"); // \DateTime | 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 = new \DateTime("2013-10-20"); // \DateTime | 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 = "desc"; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed +$status = "status_example"; // string | Filter the records by `status` of the scheduled email batch or message. +$limit = 100; // int | Number of documents returned per page +$offset = 0; // int | Index of the first document on the page + +try { + $result = $apiInstance->getScheduledEmailByBatchId($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByBatchId: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **batchId** | **string**| The batchId of scheduled emails batch (Should be a valid UUIDv4) | + **startDate** | **\DateTime**| 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. | [optional] + **endDate** | **\DateTime**| 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. | [optional] + **sort** | **string**| Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed | [optional] [default to desc] + **status** | **string**| Filter the records by `status` of the scheduled email batch or message. | [optional] + **limit** | **int**| Number of documents returned per page | [optional] [default to 100] + **offset** | **int**| Index of the first document on the page | [optional] [default to 0] + +### Return type + +[**\SendinBlue\Client\Model\GetScheduledEmailByBatchId**](../Model/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) + +# **getScheduledEmailById** +> getScheduledEmailById($identifier) + +Delete scheduled emails by batchId or messageId + +Delete scheduled batch of emails by batchId or single scheduled email by messageId + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$identifier = "identifier_example"; // string | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. + +try { + $apiInstance->getScheduledEmailById($identifier); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailById: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **identifier** | **string**| The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. | + +### Return type + +void (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) + +# **getScheduledEmailByMessageId** +> \SendinBlue\Client\Model\GetScheduledEmailByMessageId getScheduledEmailByMessageId($messageId, $startDate, $endDate) + +Fetch scheduled email by messageId + +Fetch scheduled email by messageId (Can retrieve data upto 30 days old) + +### Example +```php +setApiKey('api-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer'); +// Configure API key authorization: partner-key +$config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer'); + +$apiInstance = new SendinBlue\Client\Api\TransactionalEmailsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$messageId = "messageId_example"; // string | The messageId of scheduled email +$startDate = new \DateTime("2013-10-20"); // \DateTime | 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 = new \DateTime("2013-10-20"); // \DateTime | 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. + +try { + $result = $apiInstance->getScheduledEmailByMessageId($messageId, $startDate, $endDate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TransactionalEmailsApi->getScheduledEmailByMessageId: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **messageId** | **string**| The messageId of scheduled email | + **startDate** | **\DateTime**| 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. | [optional] + **endDate** | **\DateTime**| 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. | [optional] + +### Return type + +[**\SendinBlue\Client\Model\GetScheduledEmailByMessageId**](../Model/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) + # **getSmtpReport** > \SendinBlue\Client\Model\GetReports getSmtpReport($limit, $offset, $startDate, $endDate, $days, $tag, $sort) diff --git a/docs/Model/AbTestCampaignResult.md b/docs/Model/AbTestCampaignResult.md index dd4374fc..712db99d 100644 --- a/docs/Model/AbTestCampaignResult.md +++ b/docs/Model/AbTestCampaignResult.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**winningVersion** | **string** | 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. | [optional] +**winningVersion** | **string** | 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. | [optional] **winningCriteria** | **string** | Criteria choosen for winning version (Open/Click) | [optional] **winningSubjectLine** | **string** | Subject Line of current winning version | [optional] **openRate** | **string** | Open rate for current winning version | [optional] diff --git a/docs/Model/Body.md b/docs/Model/Body.md index 17f39683..34138437 100644 --- a/docs/Model/Body.md +++ b/docs/Model/Body.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of task | -**duration** | **int** | Duration of task | [optional] +**duration** | **int** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] **taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | -**date** | [**\DateTime**] | Task date/time | +**date** | [**\DateTime**] | Task due date and time | **notes** | **string** | Notes added to a task | [optional] **done** | **bool** | Task marked as done | [optional] **assignToId** | **string** | User id to whom task is assigned | [optional] diff --git a/docs/Model/Body1.md b/docs/Model/Body1.md index 027bb011..8323fe47 100644 --- a/docs/Model/Body1.md +++ b/docs/Model/Body1.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of task | -**duration** | **int** | Duration of task | [optional] +**duration** | **int** | Duration of task in milliseconds [1 minute = 60000 ms] | [optional] **taskTypeId** | **string** | Id for type of task e.g Call / Email / Meeting etc. | **date** | [**\DateTime**] | Task date/time | **notes** | **string** | Notes added to a task | [optional] diff --git a/docs/Model/CreateContact.md b/docs/Model/CreateContact.md index 08eb05d4..9ad2386f 100644 --- a/docs/Model/CreateContact.md +++ b/docs/Model/CreateContact.md @@ -5,11 +5,11 @@ 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] **attributes** | **object** | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. `{\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"}` | [optional] -**emailBlacklisted** | **bool** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] -**smsBlacklisted** | **bool** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] +**emailBlacklisted** | **bool** | Set this field to blacklist the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **bool** | Set this field to blacklist the contact for SMS (smsBlacklisted = true) | [optional] **listIds** | **int[]** | Ids of the lists to add the contact to | [optional] -**updateEnabled** | **bool** | Facilitate to update the existing contact in the same request (updateEnabled = true) | [optional] [default to false] -**smtpBlacklistSender** | **string[]** | transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) | [optional] +**updateEnabled** | **bool** | Facilitate to update the existing contact in the same request (updateEnabled = true) | [optional] [default to false] +**smtpBlacklistSender** | **string[]** | transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled = true ) | [optional] [[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/Model/CreateEmailCampaign.md b/docs/Model/CreateEmailCampaign.md index 75f6a639..1a064e4a 100644 --- a/docs/Model/CreateEmailCampaign.md +++ b/docs/Model/CreateEmailCampaign.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **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] **subject** | **string** | Subject of the campaign. Mandatory if abTesting is false. Ignored if abTesting is true. | [optional] **replyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] -**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] +**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] **recipients** | [**\SendinBlue\Client\Model\CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional] **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] **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] @@ -22,12 +22,12 @@ Name | Type | Description | Notes **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] **params** | **object** | 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] **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] -**subjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] -**subjectB** | **string** | Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] -**splitRule** | **int** | 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] -**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] -**winnerDelay** | **int** | 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] +**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] +**subjectA** | **string** | Subject A of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] +**subjectB** | **string** | Subject B of the campaign. Mandatory if abTesting = true. subjectA & subjectB should have unique value | [optional] +**splitRule** | **int** | 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] +**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] +**winnerDelay** | **int** | 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] **ipWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] **initialQuota** | **int** | 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] **increaseRate** | **int** | 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] diff --git a/docs/Model/CreateSenderModel.md b/docs/Model/CreateSenderModel.md index dedde249..ae4b381c 100644 --- a/docs/Model/CreateSenderModel.md +++ b/docs/Model/CreateSenderModel.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | ID of the Sender created | -**spfError** | **bool** | Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) | [optional] -**dkimError** | **bool** | Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) | [optional] +**spfError** | **bool** | Status of SPF configuration for the sender (true = SPF not well configured, false = SPF well configured) | [optional] +**dkimError** | **bool** | Status of DKIM configuration for the sender (true = DKIM not well configured, false = DKIM well configured) | [optional] [[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/Model/CreateSmtpTemplate.md b/docs/Model/CreateSmtpTemplate.md index bbec93b2..d4b48b2d 100644 --- a/docs/Model/CreateSmtpTemplate.md +++ b/docs/Model/CreateSmtpTemplate.md @@ -10,9 +10,9 @@ Name | Type | Description | Notes **htmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] **subject** | **string** | Subject of the template | **replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] -**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] +**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] **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] -**isActive** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional] +**isActive** | **bool** | Status of template. isActive = true means template is active and isActive = false means template is inactive | [optional] [[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/Model/CreateSubAccount.md b/docs/Model/CreateSubAccount.md index ba47729b..ae80e64a 100644 --- a/docs/Model/CreateSubAccount.md +++ b/docs/Model/CreateSubAccount.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**companyName** | **string** | Name of the organization | +**companyName** | **string** | Set the name of the sub-account company | **email** | **string** | Email address for the organization | -**language** | **string** | Language for identifying localization information | [optional] -**timezone** | **string** | Request timezone of the client | [optional] +**language** | **string** | Set the language of the sub-account | [optional] +**timezone** | **string** | Set the timezone of the sub-account | [optional] [[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/Model/CreateSubAccountResponse.md b/docs/Model/CreateSubAccountResponse.md new file mode 100644 index 00000000..db5fd6b1 --- /dev/null +++ b/docs/Model/CreateSubAccountResponse.md @@ -0,0 +1,10 @@ +# CreateSubAccountResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the sub-account created | + +[[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/Model/CreateWebhook.md b/docs/Model/CreateWebhook.md index f6d5616b..099fdbf9 100644 --- a/docs/Model/CreateWebhook.md +++ b/docs/Model/CreateWebhook.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **string** | URL of the webhook | **description** | **string** | Description of the webhook | [optional] -**events** | **string[]** | Events triggering the webhook. Possible values for Transactional type webhook – sent, 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** | **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` | **type** | **string** | Type of the webhook | [optional] [default to 'transactional'] **domain** | **string** | Inbound domain of webhook, required in case of event type `inbound` | [optional] diff --git a/docs/Model/GetAccountMarketingAutomation.md b/docs/Model/GetAccountMarketingAutomation.md index 511f64b9..7fc91c8d 100644 --- a/docs/Model/GetAccountMarketingAutomation.md +++ b/docs/Model/GetAccountMarketingAutomation.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **key** | **string** | Marketing Automation Tracker ID | [optional] -**enabled** | **bool** | Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) | +**enabled** | **bool** | Status of Marketing Automation Plateform activation for your account (true=enabled, false=disabled) | [[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/Model/GetAccountRelay.md b/docs/Model/GetAccountRelay.md index 743ff817..c869cd2a 100644 --- a/docs/Model/GetAccountRelay.md +++ b/docs/Model/GetAccountRelay.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | Status of your transactional email Account (true=Enabled, false=Disabled) | +**enabled** | **bool** | Status of your transactional email Account (true=Enabled, false=Disabled) | **data** | [**\SendinBlue\Client\Model\GetAccountRelayData**](GetAccountRelayData.md) | | [[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/Model/GetEmailCampaign.md b/docs/Model/GetEmailCampaign.md index d0a19f8a..109b6c8e 100644 --- a/docs/Model/GetEmailCampaign.md +++ b/docs/Model/GetEmailCampaign.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **winnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] **winnerDelay** | **int** | 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] **sendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] -**testSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | +**testSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | **header** | **string** | Header of the campaign | **footer** | **string** | Footer of the campaign | **sender** | [**\SendinBlue\Client\Model\GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | diff --git a/docs/Model/GetExtendedCampaignOverview.md b/docs/Model/GetExtendedCampaignOverview.md index 1b85ff05..41b41850 100644 --- a/docs/Model/GetExtendedCampaignOverview.md +++ b/docs/Model/GetExtendedCampaignOverview.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **winnerCriteria** | **string** | Criteria for the winning version. Only available if `abTesting` flag of the campaign is `true` | [optional] **winnerDelay** | **int** | 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] **sendAtBestTime** | **bool** | It is true if you have chosen to send your campaign at best time, otherwise it is false | [optional] -**testSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | +**testSent** | **bool** | Retrieved the status of test email sending. (true=Test email has been sent false=Test email has not been sent) | **header** | **string** | Header of the campaign | **footer** | **string** | Footer of the campaign | **sender** | [**\SendinBlue\Client\Model\GetExtendedCampaignOverviewSender**](GetExtendedCampaignOverviewSender.md) | | diff --git a/docs/Model/GetIp.md b/docs/Model/GetIp.md index c3e2abd7..efc77a84 100644 --- a/docs/Model/GetIp.md +++ b/docs/Model/GetIp.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | ID of the dedicated IP | **ip** | **string** | Dedicated IP | -**active** | **bool** | Status of the IP (true=active, false=inactive) | +**active** | **bool** | Status of the IP (true=active, false=inactive) | **domain** | **string** | Domain associated to the IP | [[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/Model/GetScheduledEmailByBatchid.md b/docs/Model/GetScheduledEmailByBatchid.md new file mode 100644 index 00000000..6408d4fc --- /dev/null +++ b/docs/Model/GetScheduledEmailByBatchid.md @@ -0,0 +1,11 @@ +# GetScheduledEmailByBatchId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | Total number of batches | [optional] +**batches** | [**\SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[]**](GetScheduledEmailByBatchIdBatches.md) | | [optional] + +[[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/Model/GetScheduledEmailByBatchidBatches.md b/docs/Model/GetScheduledEmailByBatchidBatches.md new file mode 100644 index 00000000..17585e39 --- /dev/null +++ b/docs/Model/GetScheduledEmailByBatchidBatches.md @@ -0,0 +1,12 @@ +# GetScheduledEmailByBatchIdBatches + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduledAt** | [**\DateTime**] | Datetime for which the batch was scheduled | +**createdAt** | [**\DateTime**] | Datetime on which the batch was scheduled | +**status** | **string** | Current status of the scheduled batch | + +[[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/Model/GetScheduledEmailByMessageid.md b/docs/Model/GetScheduledEmailByMessageid.md new file mode 100644 index 00000000..049d62e7 --- /dev/null +++ b/docs/Model/GetScheduledEmailByMessageid.md @@ -0,0 +1,12 @@ +# GetScheduledEmailByMessageId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduledAt** | [**\DateTime**] | Datetime for which the email was scheduled | +**createdAt** | [**\DateTime**] | Datetime on which the email was scheduled | +**status** | **string** | Current status of the scheduled email | + +[[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/Model/GetSendersListSenders.md b/docs/Model/GetSendersListSenders.md index 4ce7278f..d15a2825 100644 --- a/docs/Model/GetSendersListSenders.md +++ b/docs/Model/GetSendersListSenders.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **id** | **int** | Id of the sender | **name** | **string** | From Name associated to the sender | **email** | **string** | From Email associated to the sender | -**active** | **bool** | Status of sender (true=activated, false=deactivated) | +**active** | **bool** | Status of sender (true=activated, false=deactivated) | **ips** | [**\SendinBlue\Client\Model\GetSendersListIps[]**](GetSendersListIps.md) | List of dedicated IP(s) available in the account. This data is displayed only for dedicated IPs | [optional] [[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/Model/GetSmtpTemplateOverview.md b/docs/Model/GetSmtpTemplateOverview.md index 554431ed..371cd822 100644 --- a/docs/Model/GetSmtpTemplateOverview.md +++ b/docs/Model/GetSmtpTemplateOverview.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes **id** | **int** | ID of the template | **name** | **string** | Name of the template | **subject** | **string** | Subject of the template | -**isActive** | **bool** | Status of template (true=active, false=inactive) | -**testSent** | **bool** | Status of test sending for the template (true=test email has been sent, false=test email has not been sent) | +**isActive** | **bool** | Status of template (true=active, false=inactive) | +**testSent** | **bool** | Status of test sending for the template (true=test email has been sent, false=test email has not been sent) | **sender** | [**\SendinBlue\Client\Model\GetSmtpTemplateOverviewSender**](GetSmtpTemplateOverviewSender.md) | | **replyTo** | **string** | Email defined as the \"Reply to\" for the template | **toField** | **string** | Customisation of the \"to\" field for the template | diff --git a/docs/Model/GetSsoToken.md b/docs/Model/GetSsoToken.md index 8f7ad814..fba745a6 100644 --- a/docs/Model/GetSsoToken.md +++ b/docs/Model/GetSsoToken.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token** | **string** | Session token. It will remain valid for a short period of time only. | +**token** | **string** | Session token, it will remain valid for 15 days. | [[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/Model/InlineResponse201.md b/docs/Model/InlineResponse201.md new file mode 100644 index 00000000..486f65fc --- /dev/null +++ b/docs/Model/InlineResponse201.md @@ -0,0 +1,10 @@ +# InlineResponse201 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique task id | + +[[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/Model/RequestContactImport.md b/docs/Model/RequestContactImport.md index 190060ba..c19dfa4c 100644 --- a/docs/Model/RequestContactImport.md +++ b/docs/Model/RequestContactImport.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **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] +**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] [[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/Model/SendSmtpEmail.md b/docs/Model/SendSmtpEmail.md index 85a6461c..19c511c7 100644 --- a/docs/Model/SendSmtpEmail.md +++ b/docs/Model/SendSmtpEmail.md @@ -11,12 +11,13 @@ Name | Type | Description | Notes **textContent** | **string** | Plain Text body of the message ( Ignored if 'templateId' is passed ) | [optional] **subject** | **string** | Subject of the message. Mandatory if 'templateId' is not passed | [optional] **replyTo** | [**\SendinBlue\Client\Model\SendSmtpEmailReplyTo**](SendSmtpEmailReplyTo.md) | | [optional] -**attachment** | [**\SendinBlue\Client\Model\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] +**attachment** | [**\SendinBlue\Client\Model\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] **headers** | **object** | 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] -**templateId** | **int** | Id of the template. Mandatory if messageVersions are passed | [optional] +**templateId** | **int** | Id of the template. | [optional] **params** | **object** | 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] -**messageVersions** | [**\SendinBlue\Client\Model\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] +**messageVersions** | [**\SendinBlue\Client\Model\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] **tags** | **string[]** | Tag your emails to find them more easily | [optional] +**scheduledAt** | [**\DateTime**] | 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 accurate result. | [optional] [[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/Model/SubAccountDetailsResponsePlanInfoCredits.md b/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md index 5957330a..7f00e62c 100644 --- a/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md +++ b/docs/Model/SubAccountDetailsResponsePlanInfoCredits.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sms** | **int** | Sms quota of the sub-account | [optional] +**sms** | **int** | SMS credits remaining on the sub-account | [optional] **emails** | [**\SendinBlue\Client\Model\SubAccountDetailsResponsePlanInfoCreditsEmails**](SubAccountDetailsResponsePlanInfoCreditsEmails.md) | | [optional] [[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/Model/SubAccountsResponseSubAccounts.md b/docs/Model/SubAccountsResponseSubAccounts.md index faa1fda9..a8014909 100644 --- a/docs/Model/SubAccountsResponseSubAccounts.md +++ b/docs/Model/SubAccountsResponseSubAccounts.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | client id of sub-account organization | -**companyName** | **string** | Name of sub-account organization | -**active** | **bool** | Whether organization is active or not | -**createdAt** | **int** | timestamp when the organization was created | +**id** | **int** | id of the sub-account | +**companyName** | **string** | Name of the sub-account company | +**active** | **bool** | Whether the sub-account is active or not | +**createdAt** | **int** | Timestamp when the sub-account was created | [[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/Model/TaskReminder.md b/docs/Model/TaskReminder.md index e383c2aa..f451c08c 100644 --- a/docs/Model/TaskReminder.md +++ b/docs/Model/TaskReminder.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **int** | Value of time unit before reminder is to be sent | **unit** | **string** | Unit of time before reminder is to be sent | -**types** | **string[]** | Type of task reminder | +**types** | **string[]** | Type of task reminder e.g email, push | [[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/Model/UpdateChildAccountStatus.md b/docs/Model/UpdateChildAccountStatus.md index 37920ac2..76b3156f 100644 --- a/docs/Model/UpdateChildAccountStatus.md +++ b/docs/Model/UpdateChildAccountStatus.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transactionalEmail** | **bool** | Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) | [optional] -**transactionalSms** | **bool** | Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) | [optional] -**marketingAutomation** | **bool** | Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) | [optional] -**smsCampaign** | **bool** | Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) | [optional] +**transactionalEmail** | **bool** | Status of Transactional Email Platform activation for your account (true=enabled, false=disabled) | [optional] +**transactionalSms** | **bool** | Status of Transactional SMS Platform activation for your account (true=enabled, false=disabled) | [optional] +**marketingAutomation** | **bool** | Status of Marketing Automation Platform activation for your account (true=enabled, false=disabled) | [optional] +**smsCampaign** | **bool** | Status of SMS Campaign Platform activation for your account (true=enabled, false=disabled) | [optional] [[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/Model/UpdateContact.md b/docs/Model/UpdateContact.md index 15c7c251..9ea9fa20 100644 --- a/docs/Model/UpdateContact.md +++ b/docs/Model/UpdateContact.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attributes** | **object** | 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] -**emailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] -**smsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] +**emailBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for emails (emailBlacklisted = true) | [optional] +**smsBlacklisted** | **bool** | Set/unset this field to blacklist/allow the contact for SMS (smsBlacklisted = true) | [optional] **listIds** | **int[]** | Ids of the lists to add the contact to | [optional] **unlinkListIds** | **int[]** | Ids of the lists to remove the contact from | [optional] **smtpBlacklistSender** | **string[]** | transactional email forbidden sender for contact. Use only for email Contact | [optional] diff --git a/docs/Model/UpdateEmailCampaign.md b/docs/Model/UpdateEmailCampaign.md index a6fb786a..9762c6e9 100644 --- a/docs/Model/UpdateEmailCampaign.md +++ b/docs/Model/UpdateEmailCampaign.md @@ -6,28 +6,28 @@ Name | Type | Description | Notes **tag** | **string** | Tag of the campaign | [optional] **sender** | [**\SendinBlue\Client\Model\UpdateEmailCampaignSender**](UpdateEmailCampaignSender.md) | | [optional] **name** | **string** | Name of the campaign | [optional] -**htmlContent** | **string** | Body of the message (HTML version). REQUIRED if htmlUrl is empty | [optional] +**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] **htmlUrl** | **string** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional] **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] **subject** | **string** | Subject of the campaign | [optional] **replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] -**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] +**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] **recipients** | [**\SendinBlue\Client\Model\UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional] **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] -**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] -**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] -**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] +**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] +**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] +**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] **footer** | **string** | Footer of the email campaign | [optional] **header** | **string** | Header of the email campaign | [optional] **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] **params** | **object** | 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] **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] -**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] -**subjectA** | **string** | Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] -**subjectB** | **string** | Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] -**splitRule** | **int** | 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] -**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] -**winnerDelay** | **int** | 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] +**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] +**subjectA** | **string** | Subject A of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] +**subjectB** | **string** | Subject B of the campaign. Considered if abTesting = true. subjectA & subjectB should have unique value | [optional] +**splitRule** | **int** | 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] +**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] +**winnerDelay** | **int** | 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] **ipWarmupEnable** | **bool** | Available for dedicated ip clients. Set this to true if you wish to warm up your ip. | [optional] [default to false] **initialQuota** | **int** | Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000. | [optional] **increaseRate** | **int** | 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] diff --git a/docs/Model/UpdateSmtpTemplate.md b/docs/Model/UpdateSmtpTemplate.md index 1278568e..bdc3f2d3 100644 --- a/docs/Model/UpdateSmtpTemplate.md +++ b/docs/Model/UpdateSmtpTemplate.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes **tag** | **string** | Tag of the template | [optional] **sender** | [**\SendinBlue\Client\Model\UpdateSmtpTemplateSender**](UpdateSmtpTemplateSender.md) | | [optional] **templateName** | **string** | Name of the template | [optional] -**htmlContent** | **string** | Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) | [optional] +**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] **htmlUrl** | **string** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional] **subject** | **string** | Subject of the email | [optional] **replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] -**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] +**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] **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] -**isActive** | **bool** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional] +**isActive** | **bool** | Status of the template. isActive = false means template is inactive, isActive = true means template is active | [optional] [[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/lib/Api/CRMApi.php b/lib/Api/CRMApi.php index fa63f438..edd17f86 100644 --- a/lib/Api/CRMApi.php +++ b/lib/Api/CRMApi.php @@ -3222,7 +3222,7 @@ protected function crmTasksIdPatchRequest($id, $body) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\Task + * @return \SendinBlue\Client\Model\InlineResponse201 */ public function crmTasksPost($body) { @@ -3239,11 +3239,11 @@ public function crmTasksPost($body) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\Task, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\InlineResponse201, HTTP status code, HTTP response headers (array of strings) */ public function crmTasksPostWithHttpInfo($body) { - $returnType = '\SendinBlue\Client\Model\Task'; + $returnType = '\SendinBlue\Client\Model\InlineResponse201'; $request = $this->crmTasksPostRequest($body); try { @@ -3295,7 +3295,7 @@ public function crmTasksPostWithHttpInfo($body) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\Task', + '\SendinBlue\Client\Model\InlineResponse201', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3337,7 +3337,7 @@ function ($response) { */ public function crmTasksPostAsyncWithHttpInfo($body) { - $returnType = '\SendinBlue\Client\Model\Task'; + $returnType = '\SendinBlue\Client\Model\InlineResponse201'; $request = $this->crmTasksPostRequest($body); return $this->client diff --git a/lib/Api/MasterAccountApi.php b/lib/Api/MasterAccountApi.php index bea546cb..42328f2d 100644 --- a/lib/Api/MasterAccountApi.php +++ b/lib/Api/MasterAccountApi.php @@ -360,7 +360,7 @@ protected function corporateMasterAccountGetRequest() * * Get the list of all the sub-accounts of the master account. * - * @param int $offset Page number of sub-accounts listing (required) + * @param int $offset Index of the first sub-account in the page (required) * @param int $limit Number of sub-accounts to be displayed on each page (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response @@ -378,7 +378,7 @@ public function corporateSubAccountGet($offset, $limit) * * Get the list of all the sub-accounts of the master account. * - * @param int $offset Page number of sub-accounts listing (required) + * @param int $offset Index of the first sub-account in the page (required) * @param int $limit Number of sub-accounts to be displayed on each page (required) * * @throws \SendinBlue\Client\ApiException on non-2xx response @@ -462,7 +462,7 @@ public function corporateSubAccountGetWithHttpInfo($offset, $limit) * * Get the list of all the sub-accounts of the master account. * - * @param int $offset Page number of sub-accounts listing (required) + * @param int $offset Index of the first sub-account in the page (required) * @param int $limit Number of sub-accounts to be displayed on each page (required) * * @throws \InvalidArgumentException @@ -483,7 +483,7 @@ function ($response) { * * Get the list of all the sub-accounts of the master account. * - * @param int $offset Page number of sub-accounts listing (required) + * @param int $offset Index of the first sub-account in the page (required) * @param int $limit Number of sub-accounts to be displayed on each page (required) * * @throws \InvalidArgumentException @@ -534,7 +534,7 @@ function ($exception) { /** * Create request for operation 'corporateSubAccountGet' * - * @param int $offset Page number of sub-accounts listing (required) + * @param int $offset Index of the first sub-account in the page (required) * @param int $limit Number of sub-accounts to be displayed on each page (required) * * @throws \InvalidArgumentException @@ -1455,7 +1455,7 @@ protected function corporateSubAccountIdPlanPutRequest($id, $updatePlanDetails) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \SendinBlue\Client\Model\CreateModel + * @return \SendinBlue\Client\Model\CreateSubAccountResponse */ public function corporateSubAccountPost($subAccountCreate) { @@ -1472,11 +1472,11 @@ public function corporateSubAccountPost($subAccountCreate) * * @throws \SendinBlue\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \SendinBlue\Client\Model\CreateModel, HTTP status code, HTTP response headers (array of strings) + * @return array of \SendinBlue\Client\Model\CreateSubAccountResponse, HTTP status code, HTTP response headers (array of strings) */ public function corporateSubAccountPostWithHttpInfo($subAccountCreate) { - $returnType = '\SendinBlue\Client\Model\CreateModel'; + $returnType = '\SendinBlue\Client\Model\CreateSubAccountResponse'; $request = $this->corporateSubAccountPostRequest($subAccountCreate); try { @@ -1528,7 +1528,7 @@ public function corporateSubAccountPostWithHttpInfo($subAccountCreate) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\SendinBlue\Client\Model\CreateModel', + '\SendinBlue\Client\Model\CreateSubAccountResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1578,7 +1578,7 @@ function ($response) { */ public function corporateSubAccountPostAsyncWithHttpInfo($subAccountCreate) { - $returnType = '\SendinBlue\Client\Model\CreateModel'; + $returnType = '\SendinBlue\Client\Model\CreateSubAccountResponse'; $request = $this->corporateSubAccountPostRequest($subAccountCreate); return $this->client diff --git a/lib/Api/TransactionalEmailsApi.php b/lib/Api/TransactionalEmailsApi.php index 6222dc29..0da1e6cd 100644 --- a/lib/Api/TransactionalEmailsApi.php +++ b/lib/Api/TransactionalEmailsApi.php @@ -2296,6 +2296,930 @@ protected function getEmailEventReportRequest($limit = '50', $offset = '0', $sta ); } + /** + * Operation getScheduledEmailByBatchId + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\GetScheduledEmailByBatchId + */ + public function getScheduledEmailByBatchId($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + list($response) = $this->getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + return $response; + } + + /** + * Operation getScheduledEmailByBatchIdWithHttpInfo + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\GetScheduledEmailByBatchId, HTTP status code, HTTP response headers (array of strings) + */ + public function getScheduledEmailByBatchIdWithHttpInfo($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByBatchId'; + $request = $this->getScheduledEmailByBatchIdRequest($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\GetScheduledEmailByBatchId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getScheduledEmailByBatchIdAsync + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByBatchIdAsync($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + return $this->getScheduledEmailByBatchIdAsyncWithHttpInfo($batchId, $startDate, $endDate, $sort, $status, $limit, $offset) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getScheduledEmailByBatchIdAsyncWithHttpInfo + * + * Fetch scheduled emails by batchId + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByBatchIdAsyncWithHttpInfo($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByBatchId'; + $request = $this->getScheduledEmailByBatchIdRequest($batchId, $startDate, $endDate, $sort, $status, $limit, $offset); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getScheduledEmailByBatchId' + * + * @param string $batchId The batchId of scheduled emails batch (Should be a valid UUIDv4) (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * @param string $sort Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc) + * @param string $status Filter the records by `status` of the scheduled email batch or message. (optional) + * @param int $limit Number of documents returned per page (optional, default to 100) + * @param int $offset Index of the first document on the page (optional, default to 0) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getScheduledEmailByBatchIdRequest($batchId, $startDate = null, $endDate = null, $sort = 'desc', $status = null, $limit = '100', $offset = '0') + { + // verify the required parameter 'batchId' is set + if ($batchId === null || (is_array($batchId) && count($batchId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $batchId when calling getScheduledEmailByBatchId' + ); + } + if ($limit !== null && $limit > 500) { + throw new \InvalidArgumentException('invalid value for "$limit" when calling TransactionalEmailsApi.getScheduledEmailByBatchId, must be smaller than or equal to 500.'); + } + + + $resourcePath = '/smtp/emailStatus/{batchId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params + if ($sort !== null) { + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); + } + // query params + if ($status !== null) { + $queryParams['status'] = ObjectSerializer::toQueryValue($status); + } + // query params + if ($limit !== null) { + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + + // path params + if ($batchId !== null) { + $resourcePath = str_replace( + '{' . 'batchId' . '}', + ObjectSerializer::toPathValue($batchId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getScheduledEmailById + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function getScheduledEmailById($identifier) + { + $this->getScheduledEmailByIdWithHttpInfo($identifier); + } + + /** + * Operation getScheduledEmailByIdWithHttpInfo + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function getScheduledEmailByIdWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->getScheduledEmailByIdRequest($identifier); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getScheduledEmailByIdAsync + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByIdAsync($identifier) + { + return $this->getScheduledEmailByIdAsyncWithHttpInfo($identifier) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getScheduledEmailByIdAsyncWithHttpInfo + * + * Delete scheduled emails by batchId or messageId + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByIdAsyncWithHttpInfo($identifier) + { + $returnType = ''; + $request = $this->getScheduledEmailByIdRequest($identifier); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getScheduledEmailById' + * + * @param string $identifier The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getScheduledEmailByIdRequest($identifier) + { + // verify the required parameter 'identifier' is set + if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $identifier when calling getScheduledEmailById' + ); + } + + $resourcePath = '/smtp/email/{identifier}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // path params + if ($identifier !== null) { + $resourcePath = str_replace( + '{' . 'identifier' . '}', + ObjectSerializer::toPathValue($identifier), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getScheduledEmailByMessageId + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \SendinBlue\Client\Model\GetScheduledEmailByMessageId + */ + public function getScheduledEmailByMessageId($messageId, $startDate = null, $endDate = null) + { + list($response) = $this->getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate, $endDate); + return $response; + } + + /** + * Operation getScheduledEmailByMessageIdWithHttpInfo + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * + * @throws \SendinBlue\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \SendinBlue\Client\Model\GetScheduledEmailByMessageId, HTTP status code, HTTP response headers (array of strings) + */ + public function getScheduledEmailByMessageIdWithHttpInfo($messageId, $startDate = null, $endDate = null) + { + $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByMessageId'; + $request = $this->getScheduledEmailByMessageIdRequest($messageId, $startDate, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\GetScheduledEmailByMessageId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SendinBlue\Client\Model\ErrorModel', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getScheduledEmailByMessageIdAsync + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByMessageIdAsync($messageId, $startDate = null, $endDate = null) + { + return $this->getScheduledEmailByMessageIdAsyncWithHttpInfo($messageId, $startDate, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getScheduledEmailByMessageIdAsyncWithHttpInfo + * + * Fetch scheduled email by messageId + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getScheduledEmailByMessageIdAsyncWithHttpInfo($messageId, $startDate = null, $endDate = null) + { + $returnType = '\SendinBlue\Client\Model\GetScheduledEmailByMessageId'; + $request = $this->getScheduledEmailByMessageIdRequest($messageId, $startDate, $endDate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getScheduledEmailByMessageId' + * + * @param string $messageId The messageId of scheduled email (required) + * @param \DateTime $startDate 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. (optional) + * @param \DateTime $endDate 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. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getScheduledEmailByMessageIdRequest($messageId, $startDate = null, $endDate = null) + { + // verify the required parameter 'messageId' is set + if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $messageId when calling getScheduledEmailByMessageId' + ); + } + + $resourcePath = '/smtp/emailStatus/{messageId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + + // path params + if ($messageId !== null) { + $resourcePath = str_replace( + '{' . 'messageId' . '}', + ObjectSerializer::toPathValue($messageId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + $httpBody = $_tempBody; + + if($headers['Content-Type'] === 'application/json') { + // \stdClass has no __toString(), so we should encode it manually + if ($httpBody instanceof \stdClass) { + $httpBody = \GuzzleHttp\json_encode($httpBody); + } + // array has no __toString(), so we should encode it manually + if(is_array($httpBody)) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); + } + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('api-key'); + if ($apiKey !== null) { + $headers['api-key'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('partner-key'); + if ($apiKey !== null) { + $headers['partner-key'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation getSmtpReport * diff --git a/lib/Configuration.php b/lib/Configuration.php index 2f57029a..d21b2c44 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -86,6 +86,13 @@ class Configuration */ protected $host = 'https://api.sendinblue.com/v3'; + /** + * User agent of the HTTP request, set to "PHP-Swagger" by default + * + * @var string + */ + protected $userAgent = 'Swagger-Codegen/1.0.0/php'; + /** * Debug switch (default set to false) * @@ -274,10 +281,7 @@ public function setUserAgent($userAgent) throw new \InvalidArgumentException('User-agent must be a string.'); } - if(strpos($userAgent, 'sendinblue_') !== false) { - $this->userAgent = $userAgent; - } - + $this->userAgent = $userAgent; return $this; } @@ -370,6 +374,7 @@ public static function getDefaultConfiguration() if (self::$defaultConfiguration === null) { self::$defaultConfiguration = new Configuration(); } + return self::$defaultConfiguration; } diff --git a/lib/Model/Body.php b/lib/Model/Body.php index 3a2ceceb..cd7879f3 100644 --- a/lib/Model/Body.php +++ b/lib/Model/Body.php @@ -252,6 +252,10 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if (!is_null($this->container['duration']) && ($this->container['duration'] < 0)) { + $invalidProperties[] = "invalid value for 'duration', must be bigger than or equal to 0."; + } + if ($this->container['taskTypeId'] === null) { $invalidProperties[] = "'taskTypeId' can't be null"; } @@ -310,12 +314,17 @@ public function getDuration() /** * Sets duration * - * @param int $duration Duration of task + * @param int $duration Duration of task in milliseconds [1 minute = 60000 ms] * * @return $this */ public function setDuration($duration) { + + if (!is_null($duration) && ($duration < 0)) { + throw new \InvalidArgumentException('invalid value for $duration when calling Body., must be bigger than or equal to 0.'); + } + $this->container['duration'] = $duration; return $this; @@ -358,7 +367,7 @@ public function getDate() /** * Sets date * - * @param \DateTime $date Task date/time + * @param \DateTime $date Task due date and time * * @return $this */ diff --git a/lib/Model/Body1.php b/lib/Model/Body1.php index ed2d9dfa..17958031 100644 --- a/lib/Model/Body1.php +++ b/lib/Model/Body1.php @@ -310,7 +310,7 @@ public function getDuration() /** * Sets duration * - * @param int $duration Duration of task + * @param int $duration Duration of task in milliseconds [1 minute = 60000 ms] * * @return $this */ diff --git a/lib/Model/CreateContact.php b/lib/Model/CreateContact.php index 5c46cc14..5fce9ee0 100644 --- a/lib/Model/CreateContact.php +++ b/lib/Model/CreateContact.php @@ -277,7 +277,7 @@ public function getAttributes() /** * Sets attributes * - * @param object $attributes Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\"FNAME\":\"Elly\", \"LNAME\":\"Roger\"} + * @param object $attributes 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\"} * * @return $this */ diff --git a/lib/Model/CreateSubAccount.php b/lib/Model/CreateSubAccount.php index 549f0007..489a74a4 100644 --- a/lib/Model/CreateSubAccount.php +++ b/lib/Model/CreateSubAccount.php @@ -58,6 +58,7 @@ class CreateSubAccount implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'companyName' => 'string', + 'email' => 'string', 'language' => 'string', 'timezone' => 'string' ]; @@ -69,6 +70,7 @@ class CreateSubAccount implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'companyName' => null, + 'email' => null, 'language' => null, 'timezone' => null ]; @@ -101,6 +103,7 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'companyName' => 'companyName', + 'email' => 'email', 'language' => 'language', 'timezone' => 'timezone' ]; @@ -112,6 +115,7 @@ public static function swaggerFormats() */ protected static $setters = [ 'companyName' => 'setCompanyName', + 'email' => 'setEmail', 'language' => 'setLanguage', 'timezone' => 'setTimezone' ]; @@ -123,6 +127,7 @@ public static function swaggerFormats() */ protected static $getters = [ 'companyName' => 'getCompanyName', + 'email' => 'getEmail', 'language' => 'getLanguage', 'timezone' => 'getTimezone' ]; @@ -211,6 +216,7 @@ public function getLanguageAllowableValues() public function __construct(array $data = null) { $this->container['companyName'] = isset($data['companyName']) ? $data['companyName'] : null; + $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['language'] = isset($data['language']) ? $data['language'] : null; $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; } @@ -227,6 +233,9 @@ public function listInvalidProperties() if ($this->container['companyName'] === null) { $invalidProperties[] = "'companyName' can't be null"; } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } $allowedValues = $this->getLanguageAllowableValues(); if (!is_null($this->container['language']) && !in_array($this->container['language'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -263,7 +272,7 @@ public function getCompanyName() /** * Sets companyName * - * @param string $companyName Name of the organization + * @param string $companyName Set the name of the sub-account company * * @return $this */ @@ -274,6 +283,30 @@ public function setCompanyName($companyName) return $this; } + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email Email address for the organization + * + * @return $this + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** * Gets language * @@ -287,7 +320,7 @@ public function getLanguage() /** * Sets language * - * @param string $language Language for identifying localization information + * @param string $language Set the language of the sub-account * * @return $this */ @@ -320,7 +353,7 @@ public function getTimezone() /** * Sets timezone * - * @param string $timezone Request timezone of the client + * @param string $timezone Set the timezone of the sub-account * * @return $this */ diff --git a/lib/Model/CreateSubAccountResponse.php b/lib/Model/CreateSubAccountResponse.php new file mode 100644 index 00000000..6255af5e --- /dev/null +++ b/lib/Model/CreateSubAccountResponse.php @@ -0,0 +1,304 @@ + 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the sub-account created + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetScheduledEmailByBatchid.php b/lib/Model/GetScheduledEmailByBatchid.php new file mode 100644 index 00000000..f4dd41af --- /dev/null +++ b/lib/Model/GetScheduledEmailByBatchid.php @@ -0,0 +1,331 @@ + 'int', + 'batches' => '\SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'count' => null, + 'batches' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', + 'batches' => 'batches' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', + 'batches' => 'setBatches' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', + 'batches' => 'getBatches' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['batches'] = isset($data['batches']) ? $data['batches'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count Total number of batches + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets batches + * + * @return \SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[] + */ + public function getBatches() + { + return $this->container['batches']; + } + + /** + * Sets batches + * + * @param \SendinBlue\Client\Model\GetScheduledEmailByBatchIdBatches[] $batches batches + * + * @return $this + */ + public function setBatches($batches) + { + $this->container['batches'] = $batches; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetScheduledEmailByBatchidBatches.php b/lib/Model/GetScheduledEmailByBatchidBatches.php new file mode 100644 index 00000000..a94ed460 --- /dev/null +++ b/lib/Model/GetScheduledEmailByBatchidBatches.php @@ -0,0 +1,406 @@ + '\DateTime', + 'createdAt' => '\DateTime', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'scheduledAt' => 'date-time', + 'createdAt' => 'date-time', + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scheduledAt' => 'scheduledAt', + 'createdAt' => 'createdAt', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scheduledAt' => 'setScheduledAt', + 'createdAt' => 'setCreatedAt', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scheduledAt' => 'getScheduledAt', + 'createdAt' => 'getCreatedAt', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_IN_PROGRESS = 'inProgress'; + const STATUS_QUEUED = 'queued'; + const STATUS_PROCESSED = 'processed'; + const STATUS_ERROR = 'error'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_IN_PROGRESS, + self::STATUS_QUEUED, + self::STATUS_PROCESSED, + self::STATUS_ERROR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scheduledAt'] === null) { + $invalidProperties[] = "'scheduledAt' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scheduledAt + * + * @return \DateTime + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param \DateTime $scheduledAt Datetime for which the batch was scheduled + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the batch was scheduled + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Current status of the scheduled batch + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetScheduledEmailByMessageid.php b/lib/Model/GetScheduledEmailByMessageid.php new file mode 100644 index 00000000..d0098fa3 --- /dev/null +++ b/lib/Model/GetScheduledEmailByMessageid.php @@ -0,0 +1,406 @@ + '\DateTime', + 'createdAt' => '\DateTime', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'scheduledAt' => 'date-time', + 'createdAt' => 'date-time', + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'scheduledAt' => 'scheduledAt', + 'createdAt' => 'createdAt', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'scheduledAt' => 'setScheduledAt', + 'createdAt' => 'setCreatedAt', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'scheduledAt' => 'getScheduledAt', + 'createdAt' => 'getCreatedAt', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + const STATUS_IN_PROGRESS = 'inProgress'; + const STATUS_QUEUED = 'queued'; + const STATUS_PROCESSED = 'processed'; + const STATUS_ERROR = 'error'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getStatusAllowableValues() + { + return [ + self::STATUS_IN_PROGRESS, + self::STATUS_QUEUED, + self::STATUS_PROCESSED, + self::STATUS_ERROR, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; + $this->container['createdAt'] = isset($data['createdAt']) ? $data['createdAt'] : null; + $this->container['status'] = isset($data['status']) ? $data['status'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['scheduledAt'] === null) { + $invalidProperties[] = "'scheduledAt' can't be null"; + } + if ($this->container['createdAt'] === null) { + $invalidProperties[] = "'createdAt' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + $allowedValues = $this->getStatusAllowableValues(); + if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets scheduledAt + * + * @return \DateTime + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param \DateTime $scheduledAt Datetime for which the email was scheduled + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } + + /** + * Gets createdAt + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['createdAt']; + } + + /** + * Sets createdAt + * + * @param \DateTime $createdAt Datetime on which the email was scheduled + * + * @return $this + */ + public function setCreatedAt($createdAt) + { + $this->container['createdAt'] = $createdAt; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status Current status of the scheduled email + * + * @return $this + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'status', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/GetSsoToken.php b/lib/Model/GetSsoToken.php index cd159486..865dfc1a 100644 --- a/lib/Model/GetSsoToken.php +++ b/lib/Model/GetSsoToken.php @@ -220,7 +220,7 @@ public function getToken() /** * Sets token * - * @param string $token Session token. It will remain valid for a short period of time only. + * @param string $token Session token, it will remain valid for 15 days. * * @return $this */ diff --git a/lib/Model/InlineResponse201.php b/lib/Model/InlineResponse201.php new file mode 100644 index 00000000..7b040f27 --- /dev/null +++ b/lib/Model/InlineResponse201.php @@ -0,0 +1,305 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $swaggerFormats = [ + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerTypes() + { + return self::$swaggerTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function swaggerFormats() + { + return self::$swaggerFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$swaggerModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id Unique task id + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SendSmtpEmail.php b/lib/Model/SendSmtpEmail.php index 93ef9f8a..b199e5d5 100644 --- a/lib/Model/SendSmtpEmail.php +++ b/lib/Model/SendSmtpEmail.php @@ -70,7 +70,8 @@ class SendSmtpEmail implements ModelInterface, ArrayAccess 'templateId' => 'int', 'params' => 'object', 'messageVersions' => '\SendinBlue\Client\Model\SendSmtpEmailMessageVersions[]', - 'tags' => 'string[]' + 'tags' => 'string[]', + 'scheduledAt' => '\DateTime' ]; /** @@ -92,7 +93,8 @@ class SendSmtpEmail implements ModelInterface, ArrayAccess 'templateId' => 'int64', 'params' => null, 'messageVersions' => null, - 'tags' => null + 'tags' => null, + 'scheduledAt' => 'date-time' ]; /** @@ -135,7 +137,8 @@ public static function swaggerFormats() 'templateId' => 'templateId', 'params' => 'params', 'messageVersions' => 'messageVersions', - 'tags' => 'tags' + 'tags' => 'tags', + 'scheduledAt' => 'scheduledAt' ]; /** @@ -157,7 +160,8 @@ public static function swaggerFormats() 'templateId' => 'setTemplateId', 'params' => 'setParams', 'messageVersions' => 'setMessageVersions', - 'tags' => 'setTags' + 'tags' => 'setTags', + 'scheduledAt' => 'setScheduledAt' ]; /** @@ -179,7 +183,8 @@ public static function swaggerFormats() 'templateId' => 'getTemplateId', 'params' => 'getParams', 'messageVersions' => 'getMessageVersions', - 'tags' => 'getTags' + 'tags' => 'getTags', + 'scheduledAt' => 'getScheduledAt' ]; /** @@ -256,6 +261,7 @@ public function __construct(array $data = null) $this->container['params'] = isset($data['params']) ? $data['params'] : null; $this->container['messageVersions'] = isset($data['messageVersions']) ? $data['messageVersions'] : null; $this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; + $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; } /** @@ -487,7 +493,7 @@ public function getAttachment() /** * Sets attachment * - * @param \SendinBlue\Client\Model\SendSmtpEmailAttachment[] $attachment 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 ) + * @param \SendinBlue\Client\Model\SendSmtpEmailAttachment[] $attachment 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 ) * * @return $this */ @@ -511,7 +517,7 @@ public function getHeaders() /** * Sets headers * - * @param object $headers 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\"}`. + * @param object $headers 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\"}`. * * @return $this */ @@ -535,7 +541,7 @@ public function getTemplateId() /** * Sets templateId * - * @param int $templateId Id of the template. Mandatory if messageVersions are passed + * @param int $templateId Id of the template. * * @return $this */ @@ -583,7 +589,7 @@ public function getMessageVersions() /** * Sets messageVersions * - * @param \SendinBlue\Client\Model\SendSmtpEmailMessageVersions[] $messageVersions 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 + * @param \SendinBlue\Client\Model\SendSmtpEmailMessageVersions[] $messageVersions 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 * * @return $this */ @@ -617,6 +623,30 @@ public function setTags($tags) return $this; } + + /** + * Gets scheduledAt + * + * @return \DateTime + */ + public function getScheduledAt() + { + return $this->container['scheduledAt']; + } + + /** + * Sets scheduledAt + * + * @param \DateTime $scheduledAt 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 accurate result. + * + * @return $this + */ + public function setScheduledAt($scheduledAt) + { + $this->container['scheduledAt'] = $scheduledAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php b/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php index e3a7e3d8..2b0c4e7b 100644 --- a/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php +++ b/lib/Model/SubAccountDetailsResponsePlanInfoCredits.php @@ -36,7 +36,7 @@ * SubAccountDetailsResponsePlanInfoCredits Class Doc Comment * * @category Class - * @description Sub-account messaging quota details + * @description Credits quota and remaining credits on the sub-account * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen @@ -224,7 +224,7 @@ public function getSms() /** * Sets sms * - * @param int $sms Sms quota of the sub-account + * @param int $sms SMS credits remaining on the sub-account * * @return $this */ diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php b/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php index 20c70cc5..88ebaed1 100644 --- a/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php +++ b/lib/Model/SubAccountDetailsResponsePlanInfoCreditsEmails.php @@ -36,7 +36,7 @@ * SubAccountDetailsResponsePlanInfoCreditsEmails Class Doc Comment * * @category Class - * @description Email quota details of the sub-account + * @description Email credits remaining on the sub-account * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen diff --git a/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php b/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php index 2a0015d3..b7dfd3b2 100644 --- a/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php +++ b/lib/Model/SubAccountDetailsResponsePlanInfoFeatures.php @@ -36,7 +36,7 @@ * SubAccountDetailsResponsePlanInfoFeatures Class Doc Comment * * @category Class - * @description Sub-account features and addons quota details + * @description Features available on the sub-account * @package SendinBlue\Client * @author Swagger Codegen team * @link https://github.com/swagger-api/swagger-codegen diff --git a/lib/Model/SubAccountsResponseSubAccounts.php b/lib/Model/SubAccountsResponseSubAccounts.php index dede1edc..1e574cd5 100644 --- a/lib/Model/SubAccountsResponseSubAccounts.php +++ b/lib/Model/SubAccountsResponseSubAccounts.php @@ -247,7 +247,7 @@ public function getId() /** * Sets id * - * @param int $id client id of sub-account organization + * @param int $id id of the sub-account * * @return $this */ @@ -271,7 +271,7 @@ public function getCompanyName() /** * Sets companyName * - * @param string $companyName Name of sub-account organization + * @param string $companyName Name of the sub-account company * * @return $this */ @@ -295,7 +295,7 @@ public function getActive() /** * Sets active * - * @param bool $active Whether organization is active or not + * @param bool $active Whether the sub-account is active or not * * @return $this */ @@ -319,7 +319,7 @@ public function getCreatedAt() /** * Sets createdAt * - * @param int $createdAt timestamp when the organization was created + * @param int $createdAt Timestamp when the sub-account was created * * @return $this */ diff --git a/lib/Model/Task.php b/lib/Model/Task.php index e3330a3d..4209ad39 100644 --- a/lib/Model/Task.php +++ b/lib/Model/Task.php @@ -65,16 +65,7 @@ class Task implements ModelInterface, ArrayAccess 'contactsIds' => 'int[]', 'contacts' => '\SendinBlue\Client\Model\Contact[]', 'dealsIds' => 'string[]', - 'companiesIds' => 'string[]', - 'assignToId' => 'string', - 'date' => '\DateTime', - 'duration' => 'int', - 'notes' => 'string', - 'done' => 'bool', - 'reminder' => '\SendinBlue\Client\Model\TaskReminder', - 'createdAt' => '\DateTime', - 'updatedAt' => '\DateTime', - 'refs' => 'object' + 'companiesIds' => 'string[]' ]; /** @@ -90,16 +81,7 @@ class Task implements ModelInterface, ArrayAccess 'contactsIds' => null, 'contacts' => null, 'dealsIds' => null, - 'companiesIds' => null, - 'assignToId' => null, - 'date' => 'date-time', - 'duration' => null, - 'notes' => null, - 'done' => null, - 'reminder' => null, - 'createdAt' => 'date-time', - 'updatedAt' => 'date-time', - 'refs' => null + 'companiesIds' => null ]; /** @@ -136,16 +118,7 @@ public static function swaggerFormats() 'contactsIds' => 'contactsIds', 'contacts' => 'contacts', 'dealsIds' => 'dealsIds', - 'companiesIds' => 'companiesIds', - 'assignToId' => 'assignToId', - 'date' => 'date', - 'duration' => 'duration', - 'notes' => 'notes', - 'done' => 'done', - 'reminder' => 'reminder', - 'createdAt' => 'createdAt', - 'updatedAt' => 'updatedAt', - 'refs' => 'refs' + 'companiesIds' => 'companiesIds' ]; /** @@ -161,16 +134,7 @@ public static function swaggerFormats() 'contactsIds' => 'setContactsIds', 'contacts' => 'setContacts', 'dealsIds' => 'setDealsIds', - 'companiesIds' => 'setCompaniesIds', - 'assignToId' => 'setAssignToId', - 'date' => 'setDate', - 'duration' => 'setDuration', - 'notes' => 'setNotes', - 'done' => 'setDone', - 'reminder' => 'setReminder', - 'createdAt' => 'setCreatedAt', - 'updatedAt' => 'setUpdatedAt', - 'refs' => 'setRefs' + 'companiesIds' => 'setCompaniesIds' ]; /** @@ -186,16 +150,7 @@ public static function swaggerFormats() 'contactsIds' => 'getContactsIds', 'contacts' => 'getContacts', 'dealsIds' => 'getDealsIds', - 'companiesIds' => 'getCompaniesIds', - 'assignToId' => 'getAssignToId', - 'date' => 'getDate', - 'duration' => 'getDuration', - 'notes' => 'getNotes', - 'done' => 'getDone', - 'reminder' => 'getReminder', - 'createdAt' => 'getCreatedAt', - 'updatedAt' => 'getUpdatedAt', - 'refs' => 'getRefs' + 'companiesIds' => 'getCompaniesIds' ]; /** diff --git a/lib/Model/TaskReminder.php b/lib/Model/TaskReminder.php index f20753c9..c279f1f7 100644 --- a/lib/Model/TaskReminder.php +++ b/lib/Model/TaskReminder.php @@ -323,7 +323,7 @@ public function getTypes() /** * Sets types * - * @param string[] $types Type of task reminder + * @param string[] $types Type of task reminder e.g email, push * * @return $this */ diff --git a/lib/Model/UpdateContact.php b/lib/Model/UpdateContact.php index b2dcf7ca..8d7b609e 100644 --- a/lib/Model/UpdateContact.php +++ b/lib/Model/UpdateContact.php @@ -247,7 +247,7 @@ public function getAttributes() /** * Sets attributes * - * @param object $attributes 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\"} + * @param object $attributes 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\"} * * @return $this */ diff --git a/lib/Model/UpdateEmailCampaign.php b/lib/Model/UpdateEmailCampaign.php index 9d21b366..83fa558f 100644 --- a/lib/Model/UpdateEmailCampaign.php +++ b/lib/Model/UpdateEmailCampaign.php @@ -498,7 +498,7 @@ public function getHtmlContent() /** * Sets htmlContent * - * @param string $htmlContent Body of the message (HTML version). REQUIRED if htmlUrl is empty + * @param string $htmlContent 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 * * @return $this */ diff --git a/lib/Model/UpdateSmtpTemplate.php b/lib/Model/UpdateSmtpTemplate.php index abe79d09..bd911291 100644 --- a/lib/Model/UpdateSmtpTemplate.php +++ b/lib/Model/UpdateSmtpTemplate.php @@ -343,7 +343,7 @@ public function getHtmlContent() /** * Sets htmlContent * - * @param string $htmlContent Required if htmlUrl is empty. Body of the message (HTML must have more than 10 characters) + * @param string $htmlContent 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) * * @return $this */ diff --git a/test/Api/TransactionalEmailsApiTest.php b/test/Api/TransactionalEmailsApiTest.php index b0547c4d..da72e318 100644 --- a/test/Api/TransactionalEmailsApiTest.php +++ b/test/Api/TransactionalEmailsApiTest.php @@ -151,6 +151,36 @@ public function testGetEmailEventReport() { } + /** + * Test case for getScheduledEmailByBatchId + * + * Fetch scheduled emails by batchId. + * + */ + public function testGetScheduledEmailByBatchId() + { + } + + /** + * Test case for getScheduledEmailById + * + * Delete scheduled emails by batchId or messageId. + * + */ + public function testGetScheduledEmailById() + { + } + + /** + * Test case for getScheduledEmailByMessageId + * + * Fetch scheduled email by messageId. + * + */ + public function testGetScheduledEmailByMessageId() + { + } + /** * Test case for getSmtpReport * diff --git a/test/Model/CreateSubAccountResponseTest.php b/test/Model/CreateSubAccountResponseTest.php new file mode 100644 index 00000000..b30a9a51 --- /dev/null +++ b/test/Model/CreateSubAccountResponseTest.php @@ -0,0 +1,85 @@ +