diff --git a/composer.lock b/composer.lock index fa9e607c..a92e5b1d 100644 --- a/composer.lock +++ b/composer.lock @@ -499,16 +499,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.6", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", - "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { @@ -520,12 +520,12 @@ }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -558,7 +558,7 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1435,16 +1435,16 @@ }, { "name": "symfony/console", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00" + "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00", - "reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00", + "url": "https://api.github.com/repos/symfony/console/zipball/6b217594552b9323bcdcfc14f8a0ce126e84cd73", + "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73", "shasum": "" }, "require": { @@ -1500,20 +1500,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-05-23T05:02:55+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/debug", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75" + "reference": "d5a058ff6ecad26b30c1ba452241306ea34c65cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75", - "reference": "47e6788c5b151cf0cfdf3329116bf33800632d75", + "url": "https://api.github.com/repos/symfony/debug/zipball/d5a058ff6ecad26b30c1ba452241306ea34c65cc", + "reference": "d5a058ff6ecad26b30c1ba452241306ea34c65cc", "shasum": "" }, "require": { @@ -1556,20 +1556,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-06-25T11:10:40+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8" + "reference": "b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fdd5abcebd1061ec647089c6c41a07ed60af09f8", - "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb", + "reference": "b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb", "shasum": "" }, "require": { @@ -1619,20 +1619,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-04-06T07:35:25+00:00" + "time": "2018-07-26T09:06:28+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed" + "reference": "a59f917e3c5d82332514cb4538387638f5bde2d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed", - "reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/a59f917e3c5d82332514cb4538387638f5bde2d6", + "reference": "a59f917e3c5d82332514cb4538387638f5bde2d6", "shasum": "" }, "require": { @@ -1669,20 +1669,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-06-21T11:10:19+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/finder", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394" + "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394", - "reference": "3a8c3de91d2b2c68cd2d665cf9d00f7ef9eaa394", + "url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a", + "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a", "shasum": "" }, "require": { @@ -1718,29 +1718,32 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-06-19T20:52:10+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", - "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "suggest": { + "ext-ctype": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1773,20 +1776,20 @@ "polyfill", "portable" ], - "time": "2018-04-30T19:57:29+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", + "version": "v1.9.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "shasum": "" }, "require": { @@ -1798,7 +1801,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1832,20 +1835,20 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/process", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "acc5a37c706ace827962851b69705b24e71ca17c" + "reference": "0414db29bd770ec5a4152683e655f55efd4fa60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/acc5a37c706ace827962851b69705b24e71ca17c", - "reference": "acc5a37c706ace827962851b69705b24e71ca17c", + "url": "https://api.github.com/repos/symfony/process/zipball/0414db29bd770ec5a4152683e655f55efd4fa60f", + "reference": "0414db29bd770ec5a4152683e655f55efd4fa60f", "shasum": "" }, "require": { @@ -1881,20 +1884,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-05-30T04:24:30+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "eb17cfa072cab26537ac37e9c4ece6c0361369af" + "reference": "deda2765e8dab2fc38492e926ea690f2a681f59d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/eb17cfa072cab26537ac37e9c4ece6c0361369af", - "reference": "eb17cfa072cab26537ac37e9c4ece6c0361369af", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/deda2765e8dab2fc38492e926ea690f2a681f59d", + "reference": "deda2765e8dab2fc38492e926ea690f2a681f59d", "shasum": "" }, "require": { @@ -1930,20 +1933,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-17T14:55:25+00:00" + "time": "2018-07-26T10:03:52+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.12", + "version": "v3.4.14", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0" + "reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", - "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/810af2d35fc72b6cf5c01116806d2b65ccaaf2e2", + "reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2", "shasum": "" }, "require": { @@ -1989,7 +1992,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-05-03T23:18:14+00:00" + "time": "2018-07-26T11:19:56+00:00" }, { "name": "webmozart/assert", diff --git a/docs/Api/EmailCampaignsApi.md b/docs/Api/EmailCampaignsApi.md index eddf22ee..161ae2c5 100644 --- a/docs/Api/EmailCampaignsApi.md +++ b/docs/Api/EmailCampaignsApi.md @@ -230,7 +230,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) # **getEmailCampaigns** -> \SendinBlue\Client\Model\GetEmailCampaigns getEmailCampaigns($type, $status, $limit, $offset) +> \SendinBlue\Client\Model\GetEmailCampaigns getEmailCampaigns($type, $status, $startDate, $endDate, $limit, $offset) Return all your created campaigns @@ -252,11 +252,13 @@ $apiInstance = new SendinBlue\Client\Api\EmailCampaignsApi( ); $type = "type_example"; // string | Filter on the type of the campaigns $status = "status_example"; // string | Filter on the status of the campaign +$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) $limit = 500; // int | Number of documents per page $offset = 0; // int | Index of the first document in the page try { - $result = $apiInstance->getEmailCampaigns($type, $status, $limit, $offset); + $result = $apiInstance->getEmailCampaigns($type, $status, $startDate, $endDate, $limit, $offset); print_r($result); } catch (Exception $e) { echo 'Exception when calling EmailCampaignsApi->getEmailCampaigns: ', $e->getMessage(), PHP_EOL; @@ -270,6 +272,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **type** | **string**| Filter on the type of the campaigns | [optional] **status** | **string**| Filter on the status of the campaign | [optional] + **startDate** | **\DateTime**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] + **endDate** | **\DateTime**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] **limit** | **int**| Number of documents per page | [optional] [default to 500] **offset** | **int**| Index of the first document in the page | [optional] [default to 0] diff --git a/docs/Model/CreateAttribute.md b/docs/Model/CreateAttribute.md index 2f5a0c5d..30b8dc22 100644 --- a/docs/Model/CreateAttribute.md +++ b/docs/Model/CreateAttribute.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] **enumeration** | [**\SendinBlue\Client\Model\CreateAttributeEnumeration[]**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{'value':1, 'label':'male'}, {'value':2, 'label':'female'}] | [optional] -**type** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] +**type** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) | [optional] [[Back to Model list]](../../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 36b25be7..505c6285 100644 --- a/docs/Model/GetEmailCampaign.md +++ b/docs/Model/GetEmailCampaign.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **inlineImageActivation** | **bool** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. | [optional] **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] +**sentDate** | [**\DateTime**] | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' | [optional] **recipients** | **object** | | **statistics** | **object** | | diff --git a/lib/Api/EmailCampaignsApi.php b/lib/Api/EmailCampaignsApi.php index 3dcbb6e1..b495aa91 100644 --- a/lib/Api/EmailCampaignsApi.php +++ b/lib/Api/EmailCampaignsApi.php @@ -1179,6 +1179,8 @@ protected function getEmailCampaignRequest($campaignId) * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param \DateTime $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) * @@ -1186,9 +1188,9 @@ protected function getEmailCampaignRequest($campaignId) * @throws \InvalidArgumentException * @return \SendinBlue\Client\Model\GetEmailCampaigns */ - public function getEmailCampaigns($type = null, $status = null, $limit = '500', $offset = '0') + public function getEmailCampaigns($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0') { - list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $limit, $offset); + list($response) = $this->getEmailCampaignsWithHttpInfo($type, $status, $startDate, $endDate, $limit, $offset); return $response; } @@ -1199,6 +1201,8 @@ public function getEmailCampaigns($type = null, $status = null, $limit = '500', * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param \DateTime $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) * @@ -1206,10 +1210,10 @@ public function getEmailCampaigns($type = null, $status = null, $limit = '500', * @throws \InvalidArgumentException * @return array of \SendinBlue\Client\Model\GetEmailCampaigns, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $limit = '500', $offset = '0') + public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetEmailCampaigns'; - $request = $this->getEmailCampaignsRequest($type, $status, $limit, $offset); + $request = $this->getEmailCampaignsRequest($type, $status, $startDate, $endDate, $limit, $offset); try { $options = $this->createHttpClientOption(); @@ -1285,15 +1289,17 @@ public function getEmailCampaignsWithHttpInfo($type = null, $status = null, $lim * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param \DateTime $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignsAsync($type = null, $status = null, $limit = '500', $offset = '0') + public function getEmailCampaignsAsync($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0') { - return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $limit, $offset) + return $this->getEmailCampaignsAsyncWithHttpInfo($type, $status, $startDate, $endDate, $limit, $offset) ->then( function ($response) { return $response[0]; @@ -1308,16 +1314,18 @@ function ($response) { * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param \DateTime $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $limit = '500', $offset = '0') + public function getEmailCampaignsAsyncWithHttpInfo($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0') { $returnType = '\SendinBlue\Client\Model\GetEmailCampaigns'; - $request = $this->getEmailCampaignsRequest($type, $status, $limit, $offset); + $request = $this->getEmailCampaignsRequest($type, $status, $startDate, $endDate, $limit, $offset); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1361,13 +1369,15 @@ function ($exception) { * * @param string $type Filter on the type of the campaigns (optional) * @param string $status Filter on the status of the campaign (optional) + * @param \DateTime $startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) + * @param \DateTime $endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional) * @param int $limit Number of documents per page (optional, default to 500) * @param int $offset Index of the first document in the page (optional, default to 0) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEmailCampaignsRequest($type = null, $status = null, $limit = '500', $offset = '0') + protected function getEmailCampaignsRequest($type = null, $status = null, $startDate = null, $endDate = null, $limit = '500', $offset = '0') { if ($limit !== null && $limit > 1000) { throw new \InvalidArgumentException('invalid value for "$limit" when calling EmailCampaignsApi.getEmailCampaigns, must be smaller than or equal to 1000.'); @@ -1390,6 +1400,14 @@ protected function getEmailCampaignsRequest($type = null, $status = null, $limit $queryParams['status'] = ObjectSerializer::toQueryValue($status); } // query params + if ($startDate !== null) { + $queryParams['startDate'] = ObjectSerializer::toQueryValue($startDate); + } + // query params + if ($endDate !== null) { + $queryParams['endDate'] = ObjectSerializer::toQueryValue($endDate); + } + // query params if ($limit !== null) { $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } diff --git a/lib/Model/CreateAttribute.php b/lib/Model/CreateAttribute.php index 54cdae75..25041625 100644 --- a/lib/Model/CreateAttribute.php +++ b/lib/Model/CreateAttribute.php @@ -171,6 +171,7 @@ public function getModelName() const TYPE_TEXT = 'text'; const TYPE_DATE = 'date'; const TYPE_FLOAT = 'float'; + const TYPE_BOOLEAN = 'boolean'; const TYPE_ID = 'id'; const TYPE_CATEGORY = 'category'; @@ -187,6 +188,7 @@ public function getTypeAllowableValues() self::TYPE_TEXT, self::TYPE_DATE, self::TYPE_FLOAT, + self::TYPE_BOOLEAN, self::TYPE_ID, self::TYPE_CATEGORY, ]; @@ -311,7 +313,7 @@ public function getType() /** * Sets type * - * @param string $type Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) + * @param string $type Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute ) * * @return $this */ diff --git a/lib/Model/GetEmailCampaign.php b/lib/Model/GetEmailCampaign.php index 9baa7e14..e6cf5573 100644 --- a/lib/Model/GetEmailCampaign.php +++ b/lib/Model/GetEmailCampaign.php @@ -77,6 +77,7 @@ class GetEmailCampaign implements ModelInterface, ArrayAccess 'inlineImageActivation' => 'bool', 'mirrorActive' => 'bool', 'recurring' => 'bool', + 'sentDate' => '\DateTime', 'recipients' => 'object', 'statistics' => 'object' ]; @@ -107,6 +108,7 @@ class GetEmailCampaign implements ModelInterface, ArrayAccess 'inlineImageActivation' => null, 'mirrorActive' => null, 'recurring' => null, + 'sentDate' => 'date-time', 'recipients' => null, 'statistics' => null ]; @@ -158,6 +160,7 @@ public static function swaggerFormats() 'inlineImageActivation' => 'inlineImageActivation', 'mirrorActive' => 'mirrorActive', 'recurring' => 'recurring', + 'sentDate' => 'sentDate', 'recipients' => 'recipients', 'statistics' => 'statistics' ]; @@ -188,6 +191,7 @@ public static function swaggerFormats() 'inlineImageActivation' => 'setInlineImageActivation', 'mirrorActive' => 'setMirrorActive', 'recurring' => 'setRecurring', + 'sentDate' => 'setSentDate', 'recipients' => 'setRecipients', 'statistics' => 'setStatistics' ]; @@ -218,6 +222,7 @@ public static function swaggerFormats() 'inlineImageActivation' => 'getInlineImageActivation', 'mirrorActive' => 'getMirrorActive', 'recurring' => 'getRecurring', + 'sentDate' => 'getSentDate', 'recipients' => 'getRecipients', 'statistics' => 'getStatistics' ]; @@ -340,6 +345,7 @@ public function __construct(array $data = null) $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null; $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; + $this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null; $this->container['recipients'] = isset($data['recipients']) ? $data['recipients'] : null; $this->container['statistics'] = isset($data['statistics']) ? $data['statistics'] : null; } @@ -993,6 +999,30 @@ public function setRecurring($recurring) return $this; } + /** + * Gets sentDate + * + * @return \DateTime + */ + public function getSentDate() + { + return $this->container['sentDate']; + } + + /** + * Sets sentDate + * + * @param \DateTime $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + * + * @return $this + */ + public function setSentDate($sentDate) + { + $this->container['sentDate'] = $sentDate; + + return $this; + } + /** * Gets recipients * diff --git a/lib/Model/GetExtendedCampaignOverview.php b/lib/Model/GetExtendedCampaignOverview.php index 6b195dfb..7066c0c4 100644 --- a/lib/Model/GetExtendedCampaignOverview.php +++ b/lib/Model/GetExtendedCampaignOverview.php @@ -76,7 +76,8 @@ class GetExtendedCampaignOverview implements ModelInterface, ArrayAccess 'modifiedAt' => '\DateTime', 'inlineImageActivation' => 'bool', 'mirrorActive' => 'bool', - 'recurring' => 'bool' + 'recurring' => 'bool', + 'sentDate' => '\DateTime' ]; /** @@ -104,7 +105,8 @@ class GetExtendedCampaignOverview implements ModelInterface, ArrayAccess 'modifiedAt' => 'date-time', 'inlineImageActivation' => null, 'mirrorActive' => null, - 'recurring' => null + 'recurring' => null, + 'sentDate' => 'date-time' ]; /** @@ -153,7 +155,8 @@ public static function swaggerFormats() 'modifiedAt' => 'modifiedAt', 'inlineImageActivation' => 'inlineImageActivation', 'mirrorActive' => 'mirrorActive', - 'recurring' => 'recurring' + 'recurring' => 'recurring', + 'sentDate' => 'sentDate' ]; /** @@ -181,7 +184,8 @@ public static function swaggerFormats() 'modifiedAt' => 'setModifiedAt', 'inlineImageActivation' => 'setInlineImageActivation', 'mirrorActive' => 'setMirrorActive', - 'recurring' => 'setRecurring' + 'recurring' => 'setRecurring', + 'sentDate' => 'setSentDate' ]; /** @@ -209,7 +213,8 @@ public static function swaggerFormats() 'modifiedAt' => 'getModifiedAt', 'inlineImageActivation' => 'getInlineImageActivation', 'mirrorActive' => 'getMirrorActive', - 'recurring' => 'getRecurring' + 'recurring' => 'getRecurring', + 'sentDate' => 'getSentDate' ]; /** @@ -330,6 +335,7 @@ public function __construct(array $data = null) $this->container['inlineImageActivation'] = isset($data['inlineImageActivation']) ? $data['inlineImageActivation'] : null; $this->container['mirrorActive'] = isset($data['mirrorActive']) ? $data['mirrorActive'] : null; $this->container['recurring'] = isset($data['recurring']) ? $data['recurring'] : null; + $this->container['sentDate'] = isset($data['sentDate']) ? $data['sentDate'] : null; } /** @@ -968,6 +974,30 @@ public function setRecurring($recurring) return $this; } + + /** + * Gets sentDate + * + * @return \DateTime + */ + public function getSentDate() + { + return $this->container['sentDate']; + } + + /** + * Sets sentDate + * + * @param \DateTime $sentDate Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent' + * + * @return $this + */ + public function setSentDate($sentDate) + { + $this->container['sentDate'] = $sentDate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/test/Model/GetEmailCampaignTest.php b/test/Model/GetEmailCampaignTest.php index 062a8112..b5377a8b 100644 --- a/test/Model/GetEmailCampaignTest.php +++ b/test/Model/GetEmailCampaignTest.php @@ -217,6 +217,13 @@ public function testPropertyRecurring() { } + /** + * Test attribute "sentDate" + */ + public function testPropertySentDate() + { + } + /** * Test attribute "recipients" */ diff --git a/test/Model/GetExtendedCampaignOverviewTest.php b/test/Model/GetExtendedCampaignOverviewTest.php index cd97db0a..61e3075f 100644 --- a/test/Model/GetExtendedCampaignOverviewTest.php +++ b/test/Model/GetExtendedCampaignOverviewTest.php @@ -216,4 +216,11 @@ public function testPropertyMirrorActive() public function testPropertyRecurring() { } + + /** + * Test attribute "sentDate" + */ + public function testPropertySentDate() + { + } }