Skip to content

Commit

Permalink
feat(lib): generate code from braze-specification
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored and remarkablemark committed Oct 14, 2024
1 parent ce2fd90 commit 5a3063a
Show file tree
Hide file tree
Showing 43 changed files with 129 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCampaignsTriggerScheduleCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 131 in lib/Endpoint/PostCampaignsTriggerScheduleCreate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCampaignsTriggerScheduleCreate.php#L130-L131

Added lines #L130 - L131 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCampaignsTriggerScheduleDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 101 in lib/Endpoint/PostCampaignsTriggerScheduleDelete.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCampaignsTriggerScheduleDelete.php#L100-L101

Added lines #L100 - L101 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 106 in lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php#L105-L106

Added lines #L105 - L106 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCampaignsTriggerSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 133 in lib/Endpoint/PostCampaignsTriggerSend.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCampaignsTriggerSend.php#L132-L133

Added lines #L132 - L133 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCanvasTriggerScheduleCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 115 in lib/Endpoint/PostCanvasTriggerScheduleCreate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCanvasTriggerScheduleCreate.php#L114-L115

Added lines #L114 - L115 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCanvasTriggerScheduleDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 99 in lib/Endpoint/PostCanvasTriggerScheduleDelete.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCanvasTriggerScheduleDelete.php#L98-L99

Added lines #L98 - L99 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCanvasTriggerScheduleUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 106 in lib/Endpoint/PostCanvasTriggerScheduleUpdate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCanvasTriggerScheduleUpdate.php#L105-L106

Added lines #L105 - L106 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCanvasTriggerSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 130 in lib/Endpoint/PostCanvasTriggerSend.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCanvasTriggerSend.php#L129-L130

Added lines #L129 - L130 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 250 in lib/Endpoint/PostCatalog.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCatalog.php#L249-L250

Added lines #L249 - L250 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCatalogsByCatalogNameItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 206 in lib/Endpoint/PostCatalogsByCatalogNameItem.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCatalogsByCatalogNameItem.php#L205-L206

Added lines #L205 - L206 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 191 in lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php#L190-L191

Added lines #L190 - L191 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostContentBlocksCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 139 in lib/Endpoint/PostContentBlocksCreate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostContentBlocksCreate.php#L138-L139

Added lines #L138 - L139 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostContentBlocksUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 142 in lib/Endpoint/PostContentBlocksUpdate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostContentBlocksUpdate.php#L141-L142

Added lines #L141 - L142 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostEmailBlacklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 98 in lib/Endpoint/PostEmailBlacklist.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostEmailBlacklist.php#L97-L98

Added lines #L97 - L98 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostEmailBlocklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {

Check warning on line 100 in lib/Endpoint/PostEmailBlocklist.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostEmailBlocklist.php#L97-L100

Added lines #L97 - L100 were not covered by tests
throw new \Braze\Exception\PostEmailBlocklistBadRequestException($serializer->deserialize($body, 'Braze\Model\Error', 'json'), $response);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostEmailBounceRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostEmailSpamRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 100 in lib/Endpoint/PostEmailSpamRemove.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostEmailSpamRemove.php#L99-L100

Added lines #L99 - L100 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostEmailStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 101 in lib/Endpoint/PostEmailStatus.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostEmailStatus.php#L100-L101

Added lines #L100 - L101 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostMessagesLiveActivityUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 139 in lib/Endpoint/PostMessagesLiveActivityUpdate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostMessagesLiveActivityUpdate.php#L138-L139

Added lines #L138 - L139 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostMessagesScheduleCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 112 in lib/Endpoint/PostMessagesScheduleCreate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostMessagesScheduleCreate.php#L111-L112

Added lines #L111 - L112 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostMessagesScheduleDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 98 in lib/Endpoint/PostMessagesScheduleDelete.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostMessagesScheduleDelete.php#L97-L98

Added lines #L97 - L98 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostMessagesScheduleUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 102 in lib/Endpoint/PostMessagesScheduleUpdate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostMessagesScheduleUpdate.php#L101-L102

Added lines #L101 - L102 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostMessagesSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 122 in lib/Endpoint/PostMessagesSend.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostMessagesSend.php#L121-L122

Added lines #L121 - L122 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostPreferenceCenterV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 139 in lib/Endpoint/PostPreferenceCenterV1.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostPreferenceCenterV1.php#L138-L139

Added lines #L138 - L139 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostScimV2User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 154 in lib/Endpoint/PostScimV2User.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostScimV2User.php#L153-L154

Added lines #L153 - L154 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostSendsIdCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 115 in lib/Endpoint/PostSendsIdCreate.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostSendsIdCreate.php#L114-L115

Added lines #L114 - L115 were not covered by tests
}
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);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 100 in lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php

View check run for this annotation

Codecov / codecov/patch

lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php#L99-L100

Added lines #L99 - L100 were not covered by tests
}
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);
}
Expand Down
Loading

0 comments on commit 5a3063a

Please sign in to comment.