diff --git a/braze-specification b/braze-specification index 93f5556..6dad8bd 160000 --- a/braze-specification +++ b/braze-specification @@ -1 +1 @@ -Subproject commit 93f55566ede8896ad14428d61024f68415ec15f8 +Subproject commit 6dad8bd088ef7d4fcffa65b4dbc76bda0a267c56 diff --git a/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php b/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php index a601a9f..4bf5f53 100644 --- a/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php +++ b/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php @@ -127,6 +127,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCampaignsTriggerScheduleCreateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php b/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php index 08eb46d..c91c989 100644 --- a/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php +++ b/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php @@ -97,6 +97,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCampaignsTriggerScheduleDeleteBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php b/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php index 08e04e6..84b2738 100644 --- a/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php +++ b/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php @@ -102,6 +102,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCampaignsTriggerScheduleUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCampaignsTriggerSend.php b/lib/Endpoint/PostCampaignsTriggerSend.php index c79d742..1c56901 100644 --- a/lib/Endpoint/PostCampaignsTriggerSend.php +++ b/lib/Endpoint/PostCampaignsTriggerSend.php @@ -129,6 +129,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCampaignsTriggerSendBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCanvasTriggerScheduleCreate.php b/lib/Endpoint/PostCanvasTriggerScheduleCreate.php index 478e0bb..4ab9705 100644 --- a/lib/Endpoint/PostCanvasTriggerScheduleCreate.php +++ b/lib/Endpoint/PostCanvasTriggerScheduleCreate.php @@ -111,6 +111,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCanvasTriggerScheduleCreateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCanvasTriggerScheduleDelete.php b/lib/Endpoint/PostCanvasTriggerScheduleDelete.php index aff618a..aca209c 100644 --- a/lib/Endpoint/PostCanvasTriggerScheduleDelete.php +++ b/lib/Endpoint/PostCanvasTriggerScheduleDelete.php @@ -95,6 +95,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCanvasTriggerScheduleDeleteBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php b/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php index 69f5820..f0fd695 100644 --- a/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php +++ b/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php @@ -102,6 +102,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCanvasTriggerScheduleUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCanvasTriggerSend.php b/lib/Endpoint/PostCanvasTriggerSend.php index fbbc89b..ca1e27d 100644 --- a/lib/Endpoint/PostCanvasTriggerSend.php +++ b/lib/Endpoint/PostCanvasTriggerSend.php @@ -126,6 +126,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCanvasTriggerSendBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCatalog.php b/lib/Endpoint/PostCatalog.php index fa44497..735710b 100644 --- a/lib/Endpoint/PostCatalog.php +++ b/lib/Endpoint/PostCatalog.php @@ -246,6 +246,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCatalogBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCatalogsByCatalogNameItem.php b/lib/Endpoint/PostCatalogsByCatalogNameItem.php index 3ef71a6..b2e0d25 100644 --- a/lib/Endpoint/PostCatalogsByCatalogNameItem.php +++ b/lib/Endpoint/PostCatalogsByCatalogNameItem.php @@ -202,6 +202,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCatalogsByCatalogNameItemBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php b/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php index d847207..0a22653 100644 --- a/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php +++ b/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php @@ -187,6 +187,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostContentBlocksCreate.php b/lib/Endpoint/PostContentBlocksCreate.php index 53c137f..0ba6684 100644 --- a/lib/Endpoint/PostContentBlocksCreate.php +++ b/lib/Endpoint/PostContentBlocksCreate.php @@ -135,6 +135,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostContentBlocksCreateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostContentBlocksUpdate.php b/lib/Endpoint/PostContentBlocksUpdate.php index 1dd94c2..66cdee1 100644 --- a/lib/Endpoint/PostContentBlocksUpdate.php +++ b/lib/Endpoint/PostContentBlocksUpdate.php @@ -138,6 +138,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostContentBlocksUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostEmailBlacklist.php b/lib/Endpoint/PostEmailBlacklist.php index 44ddf8e..47cf4cd 100644 --- a/lib/Endpoint/PostEmailBlacklist.php +++ b/lib/Endpoint/PostEmailBlacklist.php @@ -94,6 +94,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostEmailBlacklistBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostEmailBlocklist.php b/lib/Endpoint/PostEmailBlocklist.php index 9dbe640..cf2b9bc 100644 --- a/lib/Endpoint/PostEmailBlocklist.php +++ b/lib/Endpoint/PostEmailBlocklist.php @@ -94,6 +94,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostEmailBlocklistBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostEmailBounceRemove.php b/lib/Endpoint/PostEmailBounceRemove.php index c207f21..c329779 100644 --- a/lib/Endpoint/PostEmailBounceRemove.php +++ b/lib/Endpoint/PostEmailBounceRemove.php @@ -96,6 +96,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostEmailBounceRemoveBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostEmailSpamRemove.php b/lib/Endpoint/PostEmailSpamRemove.php index 50411d6..73b6e0a 100644 --- a/lib/Endpoint/PostEmailSpamRemove.php +++ b/lib/Endpoint/PostEmailSpamRemove.php @@ -96,6 +96,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostEmailSpamRemoveBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostEmailStatus.php b/lib/Endpoint/PostEmailStatus.php index 85efbc1..cdd088f 100644 --- a/lib/Endpoint/PostEmailStatus.php +++ b/lib/Endpoint/PostEmailStatus.php @@ -97,6 +97,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostEmailStatusBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostMessagesLiveActivityUpdate.php b/lib/Endpoint/PostMessagesLiveActivityUpdate.php index 146f3e2..f808ea6 100644 --- a/lib/Endpoint/PostMessagesLiveActivityUpdate.php +++ b/lib/Endpoint/PostMessagesLiveActivityUpdate.php @@ -135,6 +135,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostMessagesLiveActivityUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostMessagesScheduleCreate.php b/lib/Endpoint/PostMessagesScheduleCreate.php index 747523b..17660dc 100644 --- a/lib/Endpoint/PostMessagesScheduleCreate.php +++ b/lib/Endpoint/PostMessagesScheduleCreate.php @@ -108,6 +108,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostMessagesScheduleCreateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostMessagesScheduleDelete.php b/lib/Endpoint/PostMessagesScheduleDelete.php index 9b8caec..e7948fd 100644 --- a/lib/Endpoint/PostMessagesScheduleDelete.php +++ b/lib/Endpoint/PostMessagesScheduleDelete.php @@ -94,6 +94,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostMessagesScheduleDeleteBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostMessagesScheduleUpdate.php b/lib/Endpoint/PostMessagesScheduleUpdate.php index 5a96122..3f94217 100644 --- a/lib/Endpoint/PostMessagesScheduleUpdate.php +++ b/lib/Endpoint/PostMessagesScheduleUpdate.php @@ -98,6 +98,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostMessagesScheduleUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostMessagesSend.php b/lib/Endpoint/PostMessagesSend.php index 5c4c512..f8c124d 100644 --- a/lib/Endpoint/PostMessagesSend.php +++ b/lib/Endpoint/PostMessagesSend.php @@ -118,6 +118,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostMessagesSendBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostPreferenceCenterV1.php b/lib/Endpoint/PostPreferenceCenterV1.php index e8b33e7..437a8a8 100644 --- a/lib/Endpoint/PostPreferenceCenterV1.php +++ b/lib/Endpoint/PostPreferenceCenterV1.php @@ -135,6 +135,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostPreferenceCenterV1BadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostScimV2User.php b/lib/Endpoint/PostScimV2User.php index 8623662..103075c 100644 --- a/lib/Endpoint/PostScimV2User.php +++ b/lib/Endpoint/PostScimV2User.php @@ -150,6 +150,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostScimV2UserBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostSendsIdCreate.php b/lib/Endpoint/PostSendsIdCreate.php index ffd505f..e2d6908 100644 --- a/lib/Endpoint/PostSendsIdCreate.php +++ b/lib/Endpoint/PostSendsIdCreate.php @@ -111,6 +111,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostSendsIdCreateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php b/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php index fc0ca32..2e6729c 100644 --- a/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php +++ b/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php @@ -96,6 +96,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostSubscriptionStatusSet.php b/lib/Endpoint/PostSubscriptionStatusSet.php index 7dde992..8311384 100644 --- a/lib/Endpoint/PostSubscriptionStatusSet.php +++ b/lib/Endpoint/PostSubscriptionStatusSet.php @@ -116,6 +116,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostSubscriptionStatusSetBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostTemplatesEmailCreate.php b/lib/Endpoint/PostTemplatesEmailCreate.php index 5e14f6e..364223e 100644 --- a/lib/Endpoint/PostTemplatesEmailCreate.php +++ b/lib/Endpoint/PostTemplatesEmailCreate.php @@ -117,6 +117,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostTemplatesEmailCreateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostTemplatesEmailUpdate.php b/lib/Endpoint/PostTemplatesEmailUpdate.php index 4195ad7..a77b533 100644 --- a/lib/Endpoint/PostTemplatesEmailUpdate.php +++ b/lib/Endpoint/PostTemplatesEmailUpdate.php @@ -117,6 +117,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostTemplatesEmailUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php b/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php index afd2622..067efc8 100644 --- a/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php +++ b/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php @@ -286,6 +286,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersAliasNew.php b/lib/Endpoint/PostUsersAliasNew.php index 22fa0b6..3c14adf 100644 --- a/lib/Endpoint/PostUsersAliasNew.php +++ b/lib/Endpoint/PostUsersAliasNew.php @@ -100,6 +100,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersAliasNewBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersAliasUpdate.php b/lib/Endpoint/PostUsersAliasUpdate.php index 23b4bfc..e52aa71 100644 --- a/lib/Endpoint/PostUsersAliasUpdate.php +++ b/lib/Endpoint/PostUsersAliasUpdate.php @@ -111,6 +111,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersAliasUpdateBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersDelete.php b/lib/Endpoint/PostUsersDelete.php index 917ed95..3e9cd5c 100644 --- a/lib/Endpoint/PostUsersDelete.php +++ b/lib/Endpoint/PostUsersDelete.php @@ -101,6 +101,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersDeleteBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersExportGlobalControlGroup.php b/lib/Endpoint/PostUsersExportGlobalControlGroup.php index 00ad7fa..9cc38da 100644 --- a/lib/Endpoint/PostUsersExportGlobalControlGroup.php +++ b/lib/Endpoint/PostUsersExportGlobalControlGroup.php @@ -311,6 +311,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersExportGlobalControlGroupBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersExportId.php b/lib/Endpoint/PostUsersExportId.php index 32a7ca5..b080a7d 100644 --- a/lib/Endpoint/PostUsersExportId.php +++ b/lib/Endpoint/PostUsersExportId.php @@ -433,6 +433,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersExportIdBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersExportSegment.php b/lib/Endpoint/PostUsersExportSegment.php index a0e5fc2..68021b3 100644 --- a/lib/Endpoint/PostUsersExportSegment.php +++ b/lib/Endpoint/PostUsersExportSegment.php @@ -455,6 +455,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersExportSegmentBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersExternalIdsRemove.php b/lib/Endpoint/PostUsersExternalIdsRemove.php index bcde1b7..2cf9bbc 100644 --- a/lib/Endpoint/PostUsersExternalIdsRemove.php +++ b/lib/Endpoint/PostUsersExternalIdsRemove.php @@ -122,6 +122,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersExternalIdsRemoveBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersExternalIdsRename.php b/lib/Endpoint/PostUsersExternalIdsRename.php index fdb8461..bbfdc13 100644 --- a/lib/Endpoint/PostUsersExternalIdsRename.php +++ b/lib/Endpoint/PostUsersExternalIdsRename.php @@ -146,6 +146,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersExternalIdsRenameBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersIdentify.php b/lib/Endpoint/PostUsersIdentify.php index c39f1ec..82731dc 100644 --- a/lib/Endpoint/PostUsersIdentify.php +++ b/lib/Endpoint/PostUsersIdentify.php @@ -167,6 +167,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersIdentifyBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersMerge.php b/lib/Endpoint/PostUsersMerge.php index 2d51c48..42c1f2a 100644 --- a/lib/Endpoint/PostUsersMerge.php +++ b/lib/Endpoint/PostUsersMerge.php @@ -212,6 +212,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersMergeBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostUsersTrack.php b/lib/Endpoint/PostUsersTrack.php index d13a604..5c648c1 100644 --- a/lib/Endpoint/PostUsersTrack.php +++ b/lib/Endpoint/PostUsersTrack.php @@ -194,6 +194,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostUsersTrackBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); } diff --git a/lib/Endpoint/PostV2SubscriptionStatusSet.php b/lib/Endpoint/PostV2SubscriptionStatusSet.php index 40942ec..19eaa8a 100644 --- a/lib/Endpoint/PostV2SubscriptionStatusSet.php +++ b/lib/Endpoint/PostV2SubscriptionStatusSet.php @@ -110,6 +110,9 @@ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $re if (is_null($contentType) === false && (200 === $status && mb_strpos($contentType, 'application/json') !== false)) { return json_decode($body); } + if (is_null($contentType) === false && (201 === $status && mb_strpos($contentType, 'application/json') !== false)) { + return json_decode($body); + } if (is_null($contentType) === false && (400 === $status && mb_strpos($contentType, 'application/json') !== false)) { throw new \Braze\Exception\PostV2SubscriptionStatusSetBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response); }