getbrevo / brevo-php

A fully-featured PHP API client to interact with Brevo.
https://developers.brevo.com/
MIT License
51 stars 23 forks source link

API support for multiple-choice #40

Open suvikankare opened 1 month ago

suvikankare commented 1 month ago

Brevo has a new attribute type multiple-choice.

Adding this attribute type to Brevo breaks Drupal module using brevo-php and gives this error:

InvalidArgumentException: Invalid value for 'type', must be one of 'text', 'date', 'float', 'id', 'boolean' in /var/www/html/vendor/getbrevo/brevo-php/lib/Model/GetAttributesAttributes.php:373 Stack trace: #0 /var/www/html/vendor/getbrevo/brevo-php/lib/ObjectSerializer.php(316): Brevo\Client\Model\GetAttributesAttributes->setType('multiple-choice')

Blacksnipe commented 1 month ago

Came across the same issue when getting the attributes (with getAttributes()).

However, came across an additional issue where there's no support for updating these type of attributes. See the constructor of Brevo\Client\Model\UpdateAttribute. Here, there's no support for multiCategoryOptions containing an array of strings (as defined by the API docs)