Closed
Description
Looks like the GetWebhook model is incorrect. It expects marketing
and transac
as possible values for the type
property, but the actual API returns transactional
.
Steps to reproduce:
- Create a webhook using the
createWebhook
request withtransactional
type, any other data seems irrelevant. Receive the webhook ID. - Request the webhook info using the
getWebhook
and get an exception (example below)
Exception:
Exception 'InvalidArgumentException' with message 'Invalid value for 'type', must be one of 'marketing', 'transac''
in /var/www/html/vendor/sendinblue/api-v3-sdk/lib/Model/GetWebhook.php:404
Stack trace:
#0 /var/www/html/vendor/sendinblue/api-v3-sdk/lib/ObjectSerializer.php(316): SendinBlue\Client\Model\GetWebhook->setType('transactional')
#1 /var/www/html/vendor/sendinblue/api-v3-sdk/lib/Api/WebhooksApi.php(702): SendinBlue\Client\ObjectSerializer::deserialize(Object(stdClass), '\\SendinBlue\\Cli...', Array)
#2 /var/www/html/vendor/sendinblue/api-v3-sdk/lib/Api/WebhooksApi.php(643): SendinBlue\Client\Api\WebhooksApi->getWebhookWithHttpInfo(######)
...
Response returned by the API:
{
"url": "http://#####################",
"id": ######,
"description": "############",
"events": [
"unsubscribed"
],
"type": "transactional",
"createdAt": "2022-12-08T11:23:55.000+01:00",
"modifiedAt": "2022-12-08T11:23:55.000+01:00"
}
Metadata
Metadata
Assignees
Labels
No labels