diff --git a/docs/Model/CreateAttribute.md b/docs/Model/CreateAttribute.md index 357be1f..5b2553a 100644 --- a/docs/Model/CreateAttribute.md +++ b/docs/Model/CreateAttribute.md @@ -6,7 +6,8 @@ Name | Type | Description | Notes **value** | **string** | Value of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] **isRecurring** | **bool** | Type of the attribute. Use only if the attribute's category is 'calculated' or 'global' | [optional] **enumeration** | [**\Brevo\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 '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] +**multiCategoryOptions** | **string[]** | List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** | [optional] +**type** | **string** | Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' 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/UpdateAttribute.md b/docs/Model/UpdateAttribute.md index d6b270d..05657fe 100644 --- a/docs/Model/UpdateAttribute.md +++ b/docs/Model/UpdateAttribute.md @@ -4,7 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **string** | Value of the attribute to update. Use only if the attribute's category is 'calculated' or 'global' | [optional] -**enumeration** | [**\Brevo\Client\Model\UpdateAttributeEnumeration[]**](UpdateAttributeEnumeration.md) | List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, `[{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}]` | [optional] +**enumeration** | [**\Brevo\Client\Model\UpdateAttributeEnumeration[]**](UpdateAttributeEnumeration.md) | List of the values and labels that the attribute can take. Use only if the attribute's category is \"category\". For example, [{\"value\":1, \"label\":\"male\"}, {\"value\":2, \"label\":\"female\"}] | [optional] +**multiCategoryOptions** | **string[]** | Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** | [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/Model/CreateAttribute.php b/lib/Model/CreateAttribute.php index fb695e9..a66178a 100644 --- a/lib/Model/CreateAttribute.php +++ b/lib/Model/CreateAttribute.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com @@ -60,6 +60,7 @@ class CreateAttribute implements ModelInterface, ArrayAccess 'value' => 'string', 'isRecurring' => 'bool', 'enumeration' => '\Brevo\Client\Model\CreateAttributeEnumeration[]', + 'multiCategoryOptions' => 'string[]', 'type' => 'string' ]; @@ -72,6 +73,7 @@ class CreateAttribute implements ModelInterface, ArrayAccess 'value' => null, 'isRecurring' => null, 'enumeration' => null, + 'multiCategoryOptions' => null, 'type' => null ]; @@ -105,6 +107,7 @@ public static function swaggerFormats() 'value' => 'value', 'isRecurring' => 'isRecurring', 'enumeration' => 'enumeration', + 'multiCategoryOptions' => 'multiCategoryOptions', 'type' => 'type' ]; @@ -117,6 +120,7 @@ public static function swaggerFormats() 'value' => 'setValue', 'isRecurring' => 'setIsRecurring', 'enumeration' => 'setEnumeration', + 'multiCategoryOptions' => 'setMultiCategoryOptions', 'type' => 'setType' ]; @@ -129,6 +133,7 @@ public static function swaggerFormats() 'value' => 'getValue', 'isRecurring' => 'getIsRecurring', 'enumeration' => 'getEnumeration', + 'multiCategoryOptions' => 'getMultiCategoryOptions', 'type' => 'getType' ]; @@ -179,6 +184,7 @@ public function getModelName() const TYPE_BOOLEAN = 'boolean'; const TYPE_ID = 'id'; const TYPE_CATEGORY = 'category'; + const TYPE_MULTIPLE_CHOICE = 'multiple-choice'; @@ -196,6 +202,7 @@ public function getTypeAllowableValues() self::TYPE_BOOLEAN, self::TYPE_ID, self::TYPE_CATEGORY, + self::TYPE_MULTIPLE_CHOICE, ]; } @@ -218,6 +225,7 @@ public function __construct(array $data = null) $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['isRecurring'] = isset($data['isRecurring']) ? $data['isRecurring'] : null; $this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null; + $this->container['multiCategoryOptions'] = isset($data['multiCategoryOptions']) ? $data['multiCategoryOptions'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; } @@ -325,6 +333,30 @@ public function setEnumeration($enumeration) return $this; } + /** + * Gets multiCategoryOptions + * + * @return string[] + */ + public function getMultiCategoryOptions() + { + return $this->container['multiCategoryOptions']; + } + + /** + * Sets multiCategoryOptions + * + * @param string[] $multiCategoryOptions List of options you want to add for multiple-choice attribute. **Use only if the attribute's category is \"normal\" and attribute's type is \"multiple-choice\".** For example: **[\"USA\",\"INDIA\"]** + * + * @return $this + */ + public function setMultiCategoryOptions($multiCategoryOptions) + { + $this->container['multiCategoryOptions'] = $multiCategoryOptions; + + return $this; + } + /** * Gets type * @@ -338,7 +370,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 '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 ) + * @param string $type Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' and 'multiple-choice' 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/GetAttributes.php b/lib/Model/GetAttributes.php index 76861a9..8c48dbc 100644 --- a/lib/Model/GetAttributes.php +++ b/lib/Model/GetAttributes.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/Model/GetAttributesAttributes.php b/lib/Model/GetAttributesAttributes.php index 7588373..bb92fc0 100644 --- a/lib/Model/GetAttributesAttributes.php +++ b/lib/Model/GetAttributesAttributes.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/Model/GetAttributesEnumeration.php b/lib/Model/GetAttributesEnumeration.php index 32e3179..1f2b9d3 100644 --- a/lib/Model/GetAttributesEnumeration.php +++ b/lib/Model/GetAttributesEnumeration.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com diff --git a/lib/Model/UpdateAttribute.php b/lib/Model/UpdateAttribute.php index d286e99..010877e 100644 --- a/lib/Model/UpdateAttribute.php +++ b/lib/Model/UpdateAttribute.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com @@ -58,7 +58,8 @@ class UpdateAttribute implements ModelInterface, ArrayAccess */ protected static $swaggerTypes = [ 'value' => 'string', - 'enumeration' => '\Brevo\Client\Model\UpdateAttributeEnumeration[]' + 'enumeration' => '\Brevo\Client\Model\UpdateAttributeEnumeration[]', + 'multiCategoryOptions' => 'string[]' ]; /** @@ -68,7 +69,8 @@ class UpdateAttribute implements ModelInterface, ArrayAccess */ protected static $swaggerFormats = [ 'value' => null, - 'enumeration' => null + 'enumeration' => null, + 'multiCategoryOptions' => null ]; /** @@ -99,7 +101,8 @@ public static function swaggerFormats() */ protected static $attributeMap = [ 'value' => 'value', - 'enumeration' => 'enumeration' + 'enumeration' => 'enumeration', + 'multiCategoryOptions' => 'multiCategoryOptions' ]; /** @@ -109,7 +112,8 @@ public static function swaggerFormats() */ protected static $setters = [ 'value' => 'setValue', - 'enumeration' => 'setEnumeration' + 'enumeration' => 'setEnumeration', + 'multiCategoryOptions' => 'setMultiCategoryOptions' ]; /** @@ -119,7 +123,8 @@ public static function swaggerFormats() */ protected static $getters = [ 'value' => 'getValue', - 'enumeration' => 'getEnumeration' + 'enumeration' => 'getEnumeration', + 'multiCategoryOptions' => 'getMultiCategoryOptions' ]; /** @@ -184,6 +189,7 @@ public function __construct(array $data = null) { $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['enumeration'] = isset($data['enumeration']) ? $data['enumeration'] : null; + $this->container['multiCategoryOptions'] = isset($data['multiCategoryOptions']) ? $data['multiCategoryOptions'] : null; } /** @@ -257,6 +263,30 @@ public function setEnumeration($enumeration) return $this; } + + /** + * Gets multiCategoryOptions + * + * @return string[] + */ + public function getMultiCategoryOptions() + { + return $this->container['multiCategoryOptions']; + } + + /** + * Sets multiCategoryOptions + * + * @param string[] $multiCategoryOptions Use this option to add multiple-choice attributes options only if the attribute's category is \"normal\". **This option is specifically designed for updating multiple-choice attributes**. For example: **[\"USA\",\"INDIA\"]** + * + * @return $this + */ + public function setMultiCategoryOptions($multiCategoryOptions) + { + $this->container['multiCategoryOptions'] = $multiCategoryOptions; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/test/Model/CreateAttributeTest.php b/test/Model/CreateAttributeTest.php index 3897c3c..2728a3f 100644 --- a/test/Model/CreateAttributeTest.php +++ b/test/Model/CreateAttributeTest.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com @@ -97,6 +97,13 @@ public function testPropertyEnumeration() { } + /** + * Test attribute "multiCategoryOptions" + */ + public function testPropertyMultiCategoryOptions() + { + } + /** * Test attribute "type" */ diff --git a/test/Model/UpdateAttributeTest.php b/test/Model/UpdateAttributeTest.php index c6ad0e8..3429673 100644 --- a/test/Model/UpdateAttributeTest.php +++ b/test/Model/UpdateAttributeTest.php @@ -13,7 +13,7 @@ /** * Brevo API * - * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | + * Brevo provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at https://github.com/orgs/brevo **Possible responses** | Code | Message | | :-------------: | ------------- | | 200 | OK. Successful Request | | 201 | OK. Successful Creation | | 202 | OK. Request accepted | | 204 | OK. Successful Update/Deletion | | 400 | Error. Bad Request | | 401 | Error. Authentication Needed | | 402 | Error. Not enough credit, plan upgrade needed | | 403 | Error. Permission denied | | 404 | Error. Object does not exist | | 405 | Error. Method not allowed | | 406 | Error. Not Acceptable | | 422 | Error. Unprocessable Entity | * * OpenAPI spec version: 3.0.0 * Contact: contact@brevo.com @@ -89,4 +89,11 @@ public function testPropertyValue() public function testPropertyEnumeration() { } + + /** + * Test attribute "multiCategoryOptions" + */ + public function testPropertyMultiCategoryOptions() + { + } }