Hello again,
Like in the issue I reported two weeks ago, I found a discreprancy between what the REST API can return and the typings in the SDK.
When calling GET https://api.brevo.com/v3/smsCampaigns/:campaignId, the API returns :
{
"id": 31,
"recipients": {
"lists": [
{
"id": 33,
"name": "List #1"
}
],
},
}
However the SDK only allows an array of ints for GetCampaignRecipients::lists
class GetCampaignRecipients extends JsonSerializableType
{
#[JsonProperty('lists'), ArrayType(['integer'])] // should probably allow array as the API can return JSON objects
public array $lists;
...
}
Thus calling SmsCampaignsClient::getSmsCampaigns throws a BrevoException with the following message: Failed to deserialize response: Unable to deserialize value of type 'array' as 'integer'.
We do not use exclusion lists but I guess the issue is probably also there for GetCampaignRecipients::$exclusionLists.
Hello again,
Like in the issue I reported two weeks ago, I found a discreprancy between what the REST API can return and the typings in the SDK.
When calling
GET https://api.brevo.com/v3/smsCampaigns/:campaignId, the API returns :{ "id": 31, "recipients": { "lists": [ { "id": 33, "name": "List #1" } ], }, }However the SDK only allows an array of ints for
GetCampaignRecipients::listsThus calling
SmsCampaignsClient::getSmsCampaignsthrows aBrevoExceptionwith the following message:Failed to deserialize response: Unable to deserialize value of type 'array' as 'integer'.We do not use exclusion lists but I guess the issue is probably also there for
GetCampaignRecipients::$exclusionLists.