From 1e474427c99e90dd2b09c25d696836c294f08115 Mon Sep 17 00:00:00 2001 From: ekta-slt Date: Wed, 3 Oct 2018 12:04:36 +0530 Subject: [PATCH] New params added in emailCampaigns --- composer.lock | 66 ++++++++++---------- docs/Model/CreateEmailCampaign.md | 8 ++- docs/Model/CreateSmtpTemplate.md | 2 +- docs/Model/GetExtendedCampaignOverview.md | 1 + docs/Model/UpdateEmailCampaign.md | 3 +- docs/Model/UpdateSmtpTemplate.md | 2 +- lib/Model/CreateEmailCampaign.php | 76 ++++++++++++++++++++--- lib/Model/CreateSmtpTemplate.php | 2 +- lib/Model/UpdateEmailCampaign.php | 42 +++++++++++-- lib/Model/UpdateSmtpTemplate.php | 2 +- test/Model/CreateEmailCampaignTest.php | 14 +++++ test/Model/UpdateEmailCampaignTest.php | 7 +++ 12 files changed, 170 insertions(+), 55 deletions(-) diff --git a/composer.lock b/composer.lock index a92e5b1d..232ce425 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5a8d4cfcd6544d7f0da7631f6d440a51", + "content-hash": "a8e3544484c7b946e69510de1f25144d", "packages": [ { "name": "guzzlehttp/guzzle", @@ -1435,16 +1435,16 @@ }, { "name": "symfony/console", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73" + "reference": "1cbaac35024c9dfc9612b7e2310e82677bf85709" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6b217594552b9323bcdcfc14f8a0ce126e84cd73", - "reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73", + "url": "https://api.github.com/repos/symfony/console/zipball/1cbaac35024c9dfc9612b7e2310e82677bf85709", + "reference": "1cbaac35024c9dfc9612b7e2310e82677bf85709", "shasum": "" }, "require": { @@ -1500,20 +1500,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-09-30T03:37:36+00:00" }, { "name": "symfony/debug", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "d5a058ff6ecad26b30c1ba452241306ea34c65cc" + "reference": "b70cfaae39009ecde3164bb8cba4d029220d27b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/d5a058ff6ecad26b30c1ba452241306ea34c65cc", - "reference": "d5a058ff6ecad26b30c1ba452241306ea34c65cc", + "url": "https://api.github.com/repos/symfony/debug/zipball/b70cfaae39009ecde3164bb8cba4d029220d27b1", + "reference": "b70cfaae39009ecde3164bb8cba4d029220d27b1", "shasum": "" }, "require": { @@ -1556,11 +1556,11 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-09-22T18:25:03+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1623,16 +1623,16 @@ }, { "name": "symfony/filesystem", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "a59f917e3c5d82332514cb4538387638f5bde2d6" + "reference": "f89ab242d915d188fca95ee3291c72c5a094a195" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/a59f917e3c5d82332514cb4538387638f5bde2d6", - "reference": "a59f917e3c5d82332514cb4538387638f5bde2d6", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/f89ab242d915d188fca95ee3291c72c5a094a195", + "reference": "f89ab242d915d188fca95ee3291c72c5a094a195", "shasum": "" }, "require": { @@ -1669,20 +1669,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-09-30T03:32:28+00:00" }, { "name": "symfony/finder", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a" + "reference": "e8db87d755e14271e920e31ba834a4ae99483232" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a", - "reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a", + "url": "https://api.github.com/repos/symfony/finder/zipball/e8db87d755e14271e920e31ba834a4ae99483232", + "reference": "e8db87d755e14271e920e31ba834a4ae99483232", "shasum": "" }, "require": { @@ -1718,7 +1718,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-09-21T12:47:54+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1839,16 +1839,16 @@ }, { "name": "symfony/process", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0414db29bd770ec5a4152683e655f55efd4fa60f" + "reference": "8b87aca97f341d65dee430c60863f2442605c88b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0414db29bd770ec5a4152683e655f55efd4fa60f", - "reference": "0414db29bd770ec5a4152683e655f55efd4fa60f", + "url": "https://api.github.com/repos/symfony/process/zipball/8b87aca97f341d65dee430c60863f2442605c88b", + "reference": "8b87aca97f341d65dee430c60863f2442605c88b", "shasum": "" }, "require": { @@ -1884,11 +1884,11 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-09-08T13:15:14+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -1937,16 +1937,16 @@ }, { "name": "symfony/yaml", - "version": "v3.4.14", + "version": "v3.4.16", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2" + "reference": "61973ecda60e9f3561e929e19c07d4878b960fc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/810af2d35fc72b6cf5c01116806d2b65ccaaf2e2", - "reference": "810af2d35fc72b6cf5c01116806d2b65ccaaf2e2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/61973ecda60e9f3561e929e19c07d4878b960fc1", + "reference": "61973ecda60e9f3561e929e19c07d4878b960fc1", "shasum": "" }, "require": { @@ -1992,7 +1992,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:19:56+00:00" + "time": "2018-09-24T08:15:45+00:00" }, { "name": "webmozart/assert", diff --git a/docs/Model/CreateEmailCampaign.md b/docs/Model/CreateEmailCampaign.md index 222a6bb2..d3a4343c 100644 --- a/docs/Model/CreateEmailCampaign.md +++ b/docs/Model/CreateEmailCampaign.md @@ -6,12 +6,13 @@ Name | Type | Description | Notes **tag** | **string** | Tag of the campaign | [optional] **sender** | [**\SendinBlue\Client\Model\CreateEmailCampaignSender**](CreateEmailCampaignSender.md) | | **name** | **string** | Name of the campaign | -**htmlContent** | **string** | Mandatory if htmlUrl is empty. Body of the message (HTML) | [optional] -**htmlUrl** | **string** | Mandatory if htmlContent is empty. Url to the message (HTML) | [optional] +**htmlContent** | **string** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional] +**htmlUrl** | **string** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional] +**templateId** | **int** | Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional] **scheduledAt** | [**\DateTime**] | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] **subject** | **string** | Subject of the campaign | **replyTo** | **string** | Email on which the campaign recipients will be able to reply to | [optional] -**toField** | **string** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database | [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] @@ -21,6 +22,7 @@ Name | Type | Description | Notes **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'}. Only available if 'type' is 'classic' | [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 f368b19c..d4b48b2d 100644 --- a/docs/Model/CreateSmtpTemplate.md +++ b/docs/Model/CreateSmtpTemplate.md @@ -10,7 +10,7 @@ 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** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [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] diff --git a/docs/Model/GetExtendedCampaignOverview.md b/docs/Model/GetExtendedCampaignOverview.md index a918feb4..8e9df9d8 100644 --- a/docs/Model/GetExtendedCampaignOverview.md +++ b/docs/Model/GetExtendedCampaignOverview.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] [[Back to Model list]](../../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/UpdateEmailCampaign.md b/docs/Model/UpdateEmailCampaign.md index 455a6a67..d2be1219 100644 --- a/docs/Model/UpdateEmailCampaign.md +++ b/docs/Model/UpdateEmailCampaign.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **scheduledAt** | [**\DateTime**] | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional] **subject** | **string** | Subject of the campaign | [optional] **replyTo** | **string** | Email on which campaign recipients will be able to reply to | [optional] -**toField** | **string** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [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] @@ -20,6 +20,7 @@ Name | Type | Description | Notes **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'}. | [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/UpdateSmtpTemplate.md b/docs/Model/UpdateSmtpTemplate.md index ed87b03a..6da638a5 100644 --- a/docs/Model/UpdateSmtpTemplate.md +++ b/docs/Model/UpdateSmtpTemplate.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **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, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database | [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] diff --git a/lib/Model/CreateEmailCampaign.php b/lib/Model/CreateEmailCampaign.php index 4d73f248..1dbe1974 100644 --- a/lib/Model/CreateEmailCampaign.php +++ b/lib/Model/CreateEmailCampaign.php @@ -62,6 +62,7 @@ class CreateEmailCampaign implements ModelInterface, ArrayAccess 'name' => 'string', 'htmlContent' => 'string', 'htmlUrl' => 'string', + 'templateId' => 'int', 'scheduledAt' => '\DateTime', 'subject' => 'string', 'replyTo' => 'string', @@ -74,7 +75,8 @@ class CreateEmailCampaign implements ModelInterface, ArrayAccess 'type' => 'string', 'footer' => 'string', 'header' => 'string', - 'utmCampaign' => 'string' + 'utmCampaign' => 'string', + 'params' => 'object' ]; /** @@ -88,6 +90,7 @@ class CreateEmailCampaign implements ModelInterface, ArrayAccess 'name' => null, 'htmlContent' => null, 'htmlUrl' => 'url', + 'templateId' => 'int64', 'scheduledAt' => 'date-time', 'subject' => null, 'replyTo' => 'email', @@ -100,7 +103,8 @@ class CreateEmailCampaign implements ModelInterface, ArrayAccess 'type' => null, 'footer' => null, 'header' => null, - 'utmCampaign' => null + 'utmCampaign' => null, + 'params' => null ]; /** @@ -135,6 +139,7 @@ public static function swaggerFormats() 'name' => 'name', 'htmlContent' => 'htmlContent', 'htmlUrl' => 'htmlUrl', + 'templateId' => 'templateId', 'scheduledAt' => 'scheduledAt', 'subject' => 'subject', 'replyTo' => 'replyTo', @@ -147,7 +152,8 @@ public static function swaggerFormats() 'type' => 'type', 'footer' => 'footer', 'header' => 'header', - 'utmCampaign' => 'utmCampaign' + 'utmCampaign' => 'utmCampaign', + 'params' => 'params' ]; /** @@ -161,6 +167,7 @@ public static function swaggerFormats() 'name' => 'setName', 'htmlContent' => 'setHtmlContent', 'htmlUrl' => 'setHtmlUrl', + 'templateId' => 'setTemplateId', 'scheduledAt' => 'setScheduledAt', 'subject' => 'setSubject', 'replyTo' => 'setReplyTo', @@ -173,7 +180,8 @@ public static function swaggerFormats() 'type' => 'setType', 'footer' => 'setFooter', 'header' => 'setHeader', - 'utmCampaign' => 'setUtmCampaign' + 'utmCampaign' => 'setUtmCampaign', + 'params' => 'setParams' ]; /** @@ -187,6 +195,7 @@ public static function swaggerFormats() 'name' => 'getName', 'htmlContent' => 'getHtmlContent', 'htmlUrl' => 'getHtmlUrl', + 'templateId' => 'getTemplateId', 'scheduledAt' => 'getScheduledAt', 'subject' => 'getSubject', 'replyTo' => 'getReplyTo', @@ -199,7 +208,8 @@ public static function swaggerFormats() 'type' => 'getType', 'footer' => 'getFooter', 'header' => 'getHeader', - 'utmCampaign' => 'getUtmCampaign' + 'utmCampaign' => 'getUtmCampaign', + 'params' => 'getParams' ]; /** @@ -282,6 +292,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['htmlContent'] = isset($data['htmlContent']) ? $data['htmlContent'] : null; $this->container['htmlUrl'] = isset($data['htmlUrl']) ? $data['htmlUrl'] : null; + $this->container['templateId'] = isset($data['templateId']) ? $data['templateId'] : null; $this->container['scheduledAt'] = isset($data['scheduledAt']) ? $data['scheduledAt'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; $this->container['replyTo'] = isset($data['replyTo']) ? $data['replyTo'] : null; @@ -295,6 +306,7 @@ public function __construct(array $data = null) $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; $this->container['header'] = isset($data['header']) ? $data['header'] : null; $this->container['utmCampaign'] = isset($data['utmCampaign']) ? $data['utmCampaign'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; } /** @@ -443,7 +455,7 @@ public function getHtmlContent() /** * Sets htmlContent * - * @param string $htmlContent Mandatory if htmlUrl is empty. Body of the message (HTML) + * @param string $htmlContent Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) * * @return $this */ @@ -467,7 +479,7 @@ public function getHtmlUrl() /** * Sets htmlUrl * - * @param string $htmlUrl Mandatory if htmlContent is empty. Url to the message (HTML) + * @param string $htmlUrl Mandatory if htmlContent and templateId are empty. Url to the message (HTML) * * @return $this */ @@ -478,6 +490,30 @@ public function setHtmlUrl($htmlUrl) return $this; } + /** + * Gets templateId + * + * @return int + */ + public function getTemplateId() + { + return $this->container['templateId']; + } + + /** + * Sets templateId + * + * @param int $templateId Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. + * + * @return $this + */ + public function setTemplateId($templateId) + { + $this->container['templateId'] = $templateId; + + return $this; + } + /** * Gets scheduledAt * @@ -563,7 +599,7 @@ public function getToField() /** * Sets toField * - * @param string $toField To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database + * @param string $toField 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 * * @return $this */ @@ -798,6 +834,30 @@ public function setUtmCampaign($utmCampaign) return $this; } + + /** + * Gets params + * + * @return object + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param object $params Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic' + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CreateSmtpTemplate.php b/lib/Model/CreateSmtpTemplate.php index 0cc65ec8..2cbe0850 100644 --- a/lib/Model/CreateSmtpTemplate.php +++ b/lib/Model/CreateSmtpTemplate.php @@ -458,7 +458,7 @@ public function getToField() /** * Sets toField * - * @param string $toField This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account + * @param string $toField 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 * * @return $this */ diff --git a/lib/Model/UpdateEmailCampaign.php b/lib/Model/UpdateEmailCampaign.php index 84b0b235..a19dfb22 100644 --- a/lib/Model/UpdateEmailCampaign.php +++ b/lib/Model/UpdateEmailCampaign.php @@ -73,7 +73,8 @@ class UpdateEmailCampaign implements ModelInterface, ArrayAccess 'recurring' => 'bool', 'footer' => 'string', 'header' => 'string', - 'utmCampaign' => 'string' + 'utmCampaign' => 'string', + 'params' => 'object' ]; /** @@ -98,7 +99,8 @@ class UpdateEmailCampaign implements ModelInterface, ArrayAccess 'recurring' => null, 'footer' => null, 'header' => null, - 'utmCampaign' => null + 'utmCampaign' => null, + 'params' => null ]; /** @@ -144,7 +146,8 @@ public static function swaggerFormats() 'recurring' => 'recurring', 'footer' => 'footer', 'header' => 'header', - 'utmCampaign' => 'utmCampaign' + 'utmCampaign' => 'utmCampaign', + 'params' => 'params' ]; /** @@ -169,7 +172,8 @@ public static function swaggerFormats() 'recurring' => 'setRecurring', 'footer' => 'setFooter', 'header' => 'setHeader', - 'utmCampaign' => 'setUtmCampaign' + 'utmCampaign' => 'setUtmCampaign', + 'params' => 'setParams' ]; /** @@ -194,7 +198,8 @@ public static function swaggerFormats() 'recurring' => 'getRecurring', 'footer' => 'getFooter', 'header' => 'getHeader', - 'utmCampaign' => 'getUtmCampaign' + 'utmCampaign' => 'getUtmCampaign', + 'params' => 'getParams' ]; /** @@ -274,6 +279,7 @@ public function __construct(array $data = null) $this->container['footer'] = isset($data['footer']) ? $data['footer'] : null; $this->container['header'] = isset($data['header']) ? $data['header'] : null; $this->container['utmCampaign'] = isset($data['utmCampaign']) ? $data['utmCampaign'] : null; + $this->container['params'] = isset($data['params']) ? $data['params'] : null; } /** @@ -506,7 +512,7 @@ public function getToField() /** * Sets toField * - * @param string $toField This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account + * @param string $toField 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 * * @return $this */ @@ -708,6 +714,30 @@ public function setUtmCampaign($utmCampaign) return $this; } + + /** + * Gets params + * + * @return object + */ + public function getParams() + { + return $this->container['params']; + } + + /** + * Sets params + * + * @param object $params Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. + * + * @return $this + */ + public function setParams($params) + { + $this->container['params'] = $params; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateSmtpTemplate.php b/lib/Model/UpdateSmtpTemplate.php index d39cde75..8fc570de 100644 --- a/lib/Model/UpdateSmtpTemplate.php +++ b/lib/Model/UpdateSmtpTemplate.php @@ -440,7 +440,7 @@ public function getToField() /** * Sets toField * - * @param string $toField To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database + * @param string $toField 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 * * @return $this */ diff --git a/test/Model/CreateEmailCampaignTest.php b/test/Model/CreateEmailCampaignTest.php index 6123e39a..e2389b2a 100644 --- a/test/Model/CreateEmailCampaignTest.php +++ b/test/Model/CreateEmailCampaignTest.php @@ -112,6 +112,13 @@ public function testPropertyHtmlUrl() { } + /** + * Test attribute "templateId" + */ + public function testPropertyTemplateId() + { + } + /** * Test attribute "scheduledAt" */ @@ -202,4 +209,11 @@ public function testPropertyHeader() public function testPropertyUtmCampaign() { } + + /** + * Test attribute "params" + */ + public function testPropertyParams() + { + } } diff --git a/test/Model/UpdateEmailCampaignTest.php b/test/Model/UpdateEmailCampaignTest.php index 837c48e2..ac1e9b7f 100644 --- a/test/Model/UpdateEmailCampaignTest.php +++ b/test/Model/UpdateEmailCampaignTest.php @@ -195,4 +195,11 @@ public function testPropertyHeader() public function testPropertyUtmCampaign() { } + + /** + * Test attribute "params" + */ + public function testPropertyParams() + { + } }