brevo-php icon indicating copy to clipboard operation
brevo-php copied to clipboard

GetSegments problem

Open aszymkiw59112 opened this issue 1 year ago • 1 comments

Hello,

I want to geSegments via ContactsAPI, but when i call this function, i get : { 'segments': {}, // empty array 'count': 33 // ok and it is really the total number of segments }

When i pass without the function of lib, i get the segments with parameters.

Can you resolve it ? Thank you !

aszymkiw59112 avatar Jul 10 '24 08:07 aszymkiw59112

To fix this: In lib/Model/GetSegments.php:60:

protected static $swaggerTypes = [
    'segments' => '\Brevo\Client\Model\GetSegmentsSegments',
    'count' => 'int'
];

replace \Brevo\Client\Model\GetSegmentsSegments by object[]

protected static $swaggerTypes = [
    'segments' => 'object[]',
    'count' => 'int'
];

Feel free to make a PR but it looks like this repo is not really maintained...

geoffreybr avatar Mar 12 '25 17:03 geoffreybr

Issue has been fixed in this tag https://github.com/getbrevo/brevo-php/releases/tag/v2.0.14

jonirajput avatar Nov 06 '25 11:11 jonirajput