-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from getbrevo/feature_ACC-4880_1
ACC-4880: Update getAttribute API + add multiCategoryOptions
- Loading branch information
Showing
9 changed files
with
94 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected] | ||
|
@@ -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 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected] | ||
|
@@ -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. | ||
* | ||
|
Oops, something went wrong.