From 54526a2586a1fc9f019824a43436c5268d6704b3 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:38:02 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 8 ++++---- composer.json | 2 +- src/Brevo.php | 4 ++-- src/Contacts/Requests/CreateContactRequest.php | 4 +++- src/Contacts/Requests/UpdateContactRequest.php | 4 +++- src/Core/Json/JsonDecoder.php | 14 +++++++------- src/Core/Json/JsonDeserializer.php | 2 +- src/Core/Json/JsonSerializer.php | 2 +- src/Ecommerce/Types/CreateBatchOrderResponse.php | 14 +++++++------- src/Event/Requests/CreateEventRequest.php | 8 ++++++-- src/Event/Types/CreateBatchEventsRequestItem.php | 8 ++++++-- src/Process/Types/GetProcessResponseInfoImport.php | 6 +++--- src/Process/Types/GetProcessResponseStatus.php | 1 + ...GetProcessesResponseProcessesItemInfoImport.php | 6 +++--- .../GetProcessesResponseProcessesItemStatus.php | 1 + 15 files changed, 49 insertions(+), 35 deletions(-) diff --git a/.fern/metadata.json b/.fern/metadata.json index b7c675cf..c5e2fa96 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "4.46.0", + "cliVersion": "4.65.2", "generatorName": "fernapi/fern-php-sdk", - "generatorVersion": "2.2.3", + "generatorVersion": "2.4.0", "generatorConfig": { "clientName": "Brevo", "namespace": "Brevo", @@ -20,6 +20,6 @@ "generateClientInterfaces": true, "useDefaultRequestParameterValues": true }, - "originGitCommit": "f25a5c52b4f8c7fb0eab7532cf4d3032bce1c05c", - "sdkVersion": "4.0.12" + "originGitCommit": "d2e18d0bd27160206c8251e11269b139a3b4ea10", + "sdkVersion": "4.0.13" } \ No newline at end of file diff --git a/composer.json b/composer.json index 90e3fceb..653e6122 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "getbrevo/brevo-php", - "version": "4.0.12", + "version": "4.0.13", "description": "Official PHP SDK for the Brevo API.", "keywords": [ "brevo", diff --git a/src/Brevo.php b/src/Brevo.php index 5980504c..721d8acb 100644 --- a/src/Brevo.php +++ b/src/Brevo.php @@ -265,8 +265,8 @@ public function __construct( 'api-key' => $apiKey, 'X-Fern-Language' => 'PHP', 'X-Fern-SDK-Name' => 'Brevo', - 'X-Fern-SDK-Version' => '4.0.12', - 'User-Agent' => 'getbrevo/brevo-php/4.0.12', + 'X-Fern-SDK-Version' => '4.0.13', + 'User-Agent' => 'getbrevo/brevo-php/4.0.13', ]; $this->options = $options ?? []; diff --git a/src/Contacts/Requests/CreateContactRequest.php b/src/Contacts/Requests/CreateContactRequest.php index 7faa280e..88bfa8e0 100644 --- a/src/Contacts/Requests/CreateContactRequest.php +++ b/src/Contacts/Requests/CreateContactRequest.php @@ -12,12 +12,13 @@ class CreateContactRequest extends JsonSerializableType /** * @var ?array * )> $attributes Pass the set of attributes and their values. The attribute's parameter should be passed in capital letter while creating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored. **These attributes must be present in your Brevo account**. For eg: **{"FNAME":"Elly", "LNAME":"Roger", "COUNTRIES": ["India","China"]}** */ - #[JsonProperty('attributes'), ArrayType(['string' => new Union('float', 'string', 'bool', ['string'])])] + #[JsonProperty('attributes'), ArrayType(['string' => new Union('float', 'integer', 'string', 'bool', ['string'])])] public ?array $attributes; /** @@ -66,6 +67,7 @@ class CreateContactRequest extends JsonSerializableType * @param array{ * attributes?: ?array diff --git a/src/Contacts/Requests/UpdateContactRequest.php b/src/Contacts/Requests/UpdateContactRequest.php index b8240d25..89b2de3e 100644 --- a/src/Contacts/Requests/UpdateContactRequest.php +++ b/src/Contacts/Requests/UpdateContactRequest.php @@ -18,12 +18,13 @@ class UpdateContactRequest extends JsonSerializableType /** * @var ?array * )> $attributes Pass the set of attributes to be updated. **These attributes must be present in your account**. To update existing email address of a contact with the new one please pass EMAIL in attributes. For example, **{ "EMAIL":"newemail@domain.com", "FNAME":"Ellie", "LNAME":"Roger", "COUNTRIES":["India","China"]}**. The attribute's parameter should be passed in capital letter while updating a contact. Values that don't match the attribute type (e.g. text or string in a date attribute) will be ignored .Keep in mind transactional attributes can be updated the same way as normal attributes. Mobile Number in **SMS** field should be passed with proper country code. For example: **{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}** */ - #[JsonProperty('attributes'), ArrayType(['string' => new Union('float', 'string', 'bool', ['string'])])] + #[JsonProperty('attributes'), ArrayType(['string' => new Union('float', 'integer', 'string', 'bool', ['string'])])] public ?array $attributes; /** @@ -67,6 +68,7 @@ class UpdateContactRequest extends JsonSerializableType * identifierType?: ?value-of, * attributes?: ?array diff --git a/src/Core/Json/JsonDecoder.php b/src/Core/Json/JsonDecoder.php index a8a6cc06..562933cc 100644 --- a/src/Core/Json/JsonDecoder.php +++ b/src/Core/Json/JsonDecoder.php @@ -20,7 +20,7 @@ public static function decodeString(string $json): string { $decoded = self::decode($json); if (!is_string($decoded)) { - throw new JsonException("Unexpected non-string json value: " . $json); + throw new JsonException("Unexpected non-string json value: $json"); } return $decoded; } @@ -36,7 +36,7 @@ public static function decodeBool(string $json): bool { $decoded = self::decode($json); if (!is_bool($decoded)) { - throw new JsonException("Unexpected non-boolean json value: " . $json); + throw new JsonException("Unexpected non-boolean json value: $json"); } return $decoded; } @@ -52,7 +52,7 @@ public static function decodeDateTime(string $json): DateTime { $decoded = self::decode($json); if (!is_string($decoded)) { - throw new JsonException("Unexpected non-string json value for datetime: " . $json); + throw new JsonException("Unexpected non-string json value for datetime: $json"); } return JsonDeserializer::deserializeDateTime($decoded); } @@ -68,7 +68,7 @@ public static function decodeDate(string $json): DateTime { $decoded = self::decode($json); if (!is_string($decoded)) { - throw new JsonException("Unexpected non-string json value for date: " . $json); + throw new JsonException("Unexpected non-string json value for date: $json"); } return JsonDeserializer::deserializeDate($decoded); } @@ -84,7 +84,7 @@ public static function decodeFloat(string $json): float { $decoded = self::decode($json); if (!is_float($decoded)) { - throw new JsonException("Unexpected non-float json value: " . $json); + throw new JsonException("Unexpected non-float json value: $json"); } return $decoded; } @@ -100,7 +100,7 @@ public static function decodeInt(string $json): int { $decoded = self::decode($json); if (!is_int($decoded)) { - throw new JsonException("Unexpected non-integer json value: " . $json); + throw new JsonException("Unexpected non-integer json value: $json"); } return $decoded; } @@ -117,7 +117,7 @@ public static function decodeArray(string $json, array $type): array { $decoded = self::decode($json); if (!is_array($decoded)) { - throw new JsonException("Unexpected non-array json value: " . $json); + throw new JsonException("Unexpected non-array json value: $json"); } return JsonDeserializer::deserializeArray($decoded, $type); } diff --git a/src/Core/Json/JsonDeserializer.php b/src/Core/Json/JsonDeserializer.php index 64ca0318..34ef4628 100644 --- a/src/Core/Json/JsonDeserializer.php +++ b/src/Core/Json/JsonDeserializer.php @@ -103,7 +103,7 @@ public static function deserializeUnion(mixed $data, Union $type): mixed } $readableType = Utils::getReadableType($data); throw new JsonException( - "Cannot deserialize value of type $readableType with any of the union types: " . $type + "Cannot deserialize value of type $readableType with any of the union types: $type" ); } diff --git a/src/Core/Json/JsonSerializer.php b/src/Core/Json/JsonSerializer.php index 75626de7..a8b0268e 100644 --- a/src/Core/Json/JsonSerializer.php +++ b/src/Core/Json/JsonSerializer.php @@ -98,7 +98,7 @@ public static function serializeUnion(mixed $data, Union $unionType): mixed } $readableType = Utils::getReadableType($data); throw new JsonException( - "Cannot serialize value of type $readableType with any of the union types: " . $unionType + "Cannot serialize value of type $readableType with any of the union types: $unionType" ); } diff --git a/src/Ecommerce/Types/CreateBatchOrderResponse.php b/src/Ecommerce/Types/CreateBatchOrderResponse.php index 5e55c207..bfbf821e 100644 --- a/src/Ecommerce/Types/CreateBatchOrderResponse.php +++ b/src/Ecommerce/Types/CreateBatchOrderResponse.php @@ -8,16 +8,16 @@ class CreateBatchOrderResponse extends JsonSerializableType { /** - * @var ?int $count Number of orders + * @var float $batchId Batch ID of the request */ - #[JsonProperty('count')] - public ?int $count; + #[JsonProperty('batchId')] + public float $batchId; /** - * @var float $batchId Batch ID of the request + * @var ?int $count Number of orders */ - #[JsonProperty('batch_id')] - public float $batchId; + #[JsonProperty('count')] + public ?int $count; /** * @param array{ @@ -28,8 +28,8 @@ class CreateBatchOrderResponse extends JsonSerializableType public function __construct( array $values, ) { - $this->count = $values['count'] ?? null; $this->batchId = $values['batchId']; + $this->count = $values['count'] ?? null; } /** diff --git a/src/Event/Requests/CreateEventRequest.php b/src/Event/Requests/CreateEventRequest.php index dcc96dc0..b773dda8 100644 --- a/src/Event/Requests/CreateEventRequest.php +++ b/src/Event/Requests/CreateEventRequest.php @@ -15,9 +15,10 @@ class CreateEventRequest extends JsonSerializableType * @var ?array $contactProperties Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** */ - #[JsonProperty('contact_properties'), ArrayType(['string' => new Union('string', 'integer')])] + #[JsonProperty('contact_properties'), ArrayType(['string' => new Union('string', 'integer', 'bool')])] public ?array $contactProperties; /** @@ -36,11 +37,12 @@ class CreateEventRequest extends JsonSerializableType * @var ?array * |array * )> $eventProperties Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. */ - #[JsonProperty('event_properties'), ArrayType(['string' => new Union('string', 'integer', ['string' => 'mixed'], ['mixed'])])] + #[JsonProperty('event_properties'), ArrayType(['string' => new Union('string', 'integer', 'bool', ['string' => 'mixed'], ['mixed'])])] public ?array $eventProperties; /** @@ -62,11 +64,13 @@ class CreateEventRequest extends JsonSerializableType * contactProperties?: ?array, * eventDate?: ?string, * eventProperties?: ?array * |array * )>, diff --git a/src/Event/Types/CreateBatchEventsRequestItem.php b/src/Event/Types/CreateBatchEventsRequestItem.php index ef5c0597..9d31670d 100644 --- a/src/Event/Types/CreateBatchEventsRequestItem.php +++ b/src/Event/Types/CreateBatchEventsRequestItem.php @@ -13,9 +13,10 @@ class CreateBatchEventsRequestItem extends JsonSerializableType * @var ?array $contactProperties Properties defining the state of the contact associated to this event. Useful to update contact attributes defined in your contacts database while passing the event. For example: **"FIRSTNAME": "Jane" , "AGE": 37** */ - #[JsonProperty('contact_properties'), ArrayType(['string' => new Union('string', 'integer')])] + #[JsonProperty('contact_properties'), ArrayType(['string' => new Union('string', 'integer', 'bool')])] public ?array $contactProperties; /** @@ -34,11 +35,12 @@ class CreateBatchEventsRequestItem extends JsonSerializableType * @var ?array * |array * )> $eventProperties Properties of the event. Top level properties and nested properties can be used to better segment contacts and personalise workflow conditions. The following field type are supported: string, number, boolean (true/false), date (Timestamp e.g. "2024-01-24T17:39:57+01:00"). Keys are limited to 255 characters, alphanumerical characters and - _ only. Size is limited to 50Kb. */ - #[JsonProperty('event_properties'), ArrayType(['string' => new Union('string', 'integer', ['string' => 'mixed'], ['mixed'])])] + #[JsonProperty('event_properties'), ArrayType(['string' => new Union('string', 'integer', 'bool', ['string' => 'mixed'], ['mixed'])])] public ?array $eventProperties; /** @@ -60,11 +62,13 @@ class CreateBatchEventsRequestItem extends JsonSerializableType * contactProperties?: ?array, * eventDate?: ?string, * eventProperties?: ?array * |array * )>, diff --git a/src/Process/Types/GetProcessResponseInfoImport.php b/src/Process/Types/GetProcessResponseInfoImport.php index e8460766..55dcc78c 100644 --- a/src/Process/Types/GetProcessResponseInfoImport.php +++ b/src/Process/Types/GetProcessResponseInfoImport.php @@ -29,10 +29,10 @@ class GetProcessResponseInfoImport extends JsonSerializableType public ?int $duplicateExtId; /** - * @var ?int $duplicateEmailId Number of duplicate email IDs + * @var ?string $duplicateEmailId URL to CSV file containing duplicate email IDs, or null if none */ #[JsonProperty('duplicate_email_id')] - public ?int $duplicateEmailId; + public ?string $duplicateEmailId; /** * @var ?int $duplicatePhoneId Number of duplicate phone numbers @@ -57,7 +57,7 @@ class GetProcessResponseInfoImport extends JsonSerializableType * invalidEmails?: ?int, * duplicateContactId?: ?int, * duplicateExtId?: ?int, - * duplicateEmailId?: ?int, + * duplicateEmailId?: ?string, * duplicatePhoneId?: ?int, * duplicateWhatsappId?: ?int, * duplicateLandlineNumberId?: ?int, diff --git a/src/Process/Types/GetProcessResponseStatus.php b/src/Process/Types/GetProcessResponseStatus.php index d72ec805..becb0de4 100644 --- a/src/Process/Types/GetProcessResponseStatus.php +++ b/src/Process/Types/GetProcessResponseStatus.php @@ -5,6 +5,7 @@ enum GetProcessResponseStatus: string { case Queued = "queued"; + case InProcess = "in_process"; case Processing = "processing"; case Completed = "completed"; case Failed = "failed"; diff --git a/src/Process/Types/GetProcessesResponseProcessesItemInfoImport.php b/src/Process/Types/GetProcessesResponseProcessesItemInfoImport.php index f0e2721c..64a9a589 100644 --- a/src/Process/Types/GetProcessesResponseProcessesItemInfoImport.php +++ b/src/Process/Types/GetProcessesResponseProcessesItemInfoImport.php @@ -29,10 +29,10 @@ class GetProcessesResponseProcessesItemInfoImport extends JsonSerializableType public ?int $duplicateExtId; /** - * @var ?int $duplicateEmailId Number of duplicate email IDs + * @var ?string $duplicateEmailId URL to CSV file containing duplicate email IDs, or null if none */ #[JsonProperty('duplicate_email_id')] - public ?int $duplicateEmailId; + public ?string $duplicateEmailId; /** * @var ?int $duplicatePhoneId Number of duplicate phone numbers @@ -57,7 +57,7 @@ class GetProcessesResponseProcessesItemInfoImport extends JsonSerializableType * invalidEmails?: ?int, * duplicateContactId?: ?int, * duplicateExtId?: ?int, - * duplicateEmailId?: ?int, + * duplicateEmailId?: ?string, * duplicatePhoneId?: ?int, * duplicateWhatsappId?: ?int, * duplicateLandlineNumberId?: ?int, diff --git a/src/Process/Types/GetProcessesResponseProcessesItemStatus.php b/src/Process/Types/GetProcessesResponseProcessesItemStatus.php index 421d5555..71c158ab 100644 --- a/src/Process/Types/GetProcessesResponseProcessesItemStatus.php +++ b/src/Process/Types/GetProcessesResponseProcessesItemStatus.php @@ -5,6 +5,7 @@ enum GetProcessesResponseProcessesItemStatus: string { case Queued = "queued"; + case InProcess = "in_process"; case Processing = "processing"; case Completed = "completed"; case Failed = "failed";