Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump braze-specification from c2edc38 to 29a5300 #5

Merged
merged 4 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ Send a message to your user:

```php
use Braze\Braze;
use Braze\Model\MessagesSendPostBody;

$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');

$braze->client->postMessagesSend((object) [
$braze->client->postMessagesSend(new MessagesSendPostBody([
'external_user_ids' => ['your_external_user_id'],
'messages' => [
'email' => [
Expand All @@ -91,7 +92,7 @@ $braze->client->postMessagesSend((object) [
'email_template_id' => 'your_email_template_id',
],
],
]);
]));
```

Handle an API error:
Expand Down
98 changes: 49 additions & 49 deletions lib/Client.php

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/Endpoint/PatchCatalogsByCatalogNameItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PatchCatalogsByCatalogNameItem extends \Braze\Runtime\Client\BaseEndpoint
* @var string $Authorization
* }
*/
public function __construct(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [])
public function __construct(string $catalogName, \Braze\Model\CatalogsCatalogNameItemsPatchBody $requestBody = null, array $headerParameters = [])
{
$this->catalog_name = $catalogName;
$this->body = $requestBody;
Expand All @@ -127,8 +127,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CatalogsCatalogNameItemsPatchBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PatchCatalogsByCatalogNameItemByItemId.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class PatchCatalogsByCatalogNameItemByItemId extends \Braze\Runtime\Client\BaseE
* @var string $Authorization
* }
*/
public function __construct(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [])
public function __construct(string $catalogName, string $itemId, \Braze\Model\CatalogsCatalogNameItemsItemIdPatchBody $requestBody = null, array $headerParameters = [])
{
$this->catalog_name = $catalogName;
$this->item_id = $itemId;
Expand All @@ -141,8 +141,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CatalogsCatalogNameItemsItemIdPatchBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCampaignsTriggerScheduleCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class PostCampaignsTriggerScheduleCreate extends \Braze\Runtime\Client\BaseEndpo
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CampaignsTriggerScheduleCreatePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -86,8 +86,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CampaignsTriggerScheduleCreatePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCampaignsTriggerScheduleDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class PostCampaignsTriggerScheduleDelete extends \Braze\Runtime\Client\BaseEndpo
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CampaignsTriggerScheduleDeletePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -56,8 +56,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CampaignsTriggerScheduleDeletePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PostCampaignsTriggerScheduleUpdate extends \Braze\Runtime\Client\BaseEndpo
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CampaignsTriggerScheduleUpdatePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -61,8 +61,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CampaignsTriggerScheduleUpdatePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCampaignsTriggerSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class PostCampaignsTriggerSend extends \Braze\Runtime\Client\BaseEndpoint implem
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CampaignsTriggerSendPostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -88,8 +88,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CampaignsTriggerSendPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCanvasTriggerScheduleCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PostCanvasTriggerScheduleCreate extends \Braze\Runtime\Client\BaseEndpoint
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CanvasTriggerScheduleCreatePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -70,8 +70,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CanvasTriggerScheduleCreatePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCanvasTriggerScheduleDelete.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PostCanvasTriggerScheduleDelete extends \Braze\Runtime\Client\BaseEndpoint
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CanvasTriggerScheduleDeletePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -54,8 +54,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CanvasTriggerScheduleDeletePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCanvasTriggerScheduleUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PostCanvasTriggerScheduleUpdate extends \Braze\Runtime\Client\BaseEndpoint
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CanvasTriggerScheduleUpdatePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -61,8 +61,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CanvasTriggerScheduleUpdatePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCanvasTriggerSend.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class PostCanvasTriggerSend extends \Braze\Runtime\Client\BaseEndpoint implement
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CanvasTriggerSendPostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -85,8 +85,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CanvasTriggerSendPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class PostCatalog extends \Braze\Runtime\Client\BaseEndpoint implements \Braze\R
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\CatalogsPostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -205,8 +205,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CatalogsPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCatalogsByCatalogNameItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class PostCatalogsByCatalogNameItem extends \Braze\Runtime\Client\BaseEndpoint i
* @var string $Authorization
* }
*/
public function __construct(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [])
public function __construct(string $catalogName, \Braze\Model\CatalogsCatalogNameItemsPostBody $requestBody = null, array $headerParameters = [])
{
$this->catalog_name = $catalogName;
$this->body = $requestBody;
Expand All @@ -161,8 +161,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CatalogsCatalogNameItemsPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class PostCatalogsByCatalogNameItemByItemId extends \Braze\Runtime\Client\BaseEn
* @var string $Authorization
* }
*/
public function __construct(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [])
public function __construct(string $catalogName, string $itemId, \Braze\Model\CatalogsCatalogNameItemsItemIdPostBody $requestBody = null, array $headerParameters = [])
{
$this->catalog_name = $catalogName;
$this->item_id = $itemId;
Expand All @@ -146,8 +146,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\CatalogsCatalogNameItemsItemIdPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostContentBlocksCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PostContentBlocksCreate extends \Braze\Runtime\Client\BaseEndpoint impleme
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\ContentBlocksCreatePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -94,8 +94,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\ContentBlocksCreatePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostContentBlocksUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PostContentBlocksUpdate extends \Braze\Runtime\Client\BaseEndpoint impleme
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\ContentBlocksUpdatePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -97,8 +97,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\ContentBlocksUpdatePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostEmailBlacklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PostEmailBlacklist extends \Braze\Runtime\Client\BaseEndpoint implements \
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\EmailBlacklistPostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -53,8 +53,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\EmailBlacklistPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostEmailBlocklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PostEmailBlocklist extends \Braze\Runtime\Client\BaseEndpoint implements \
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\EmailBlocklistPostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -53,8 +53,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\EmailBlocklistPostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
6 changes: 3 additions & 3 deletions lib/Endpoint/PostEmailBounceRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PostEmailBounceRemove extends \Braze\Runtime\Client\BaseEndpoint implement
* @var string $Authorization
* }
*/
public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
public function __construct(\Braze\Model\EmailBounceRemovePostBody $requestBody = null, array $headerParameters = [])
{
$this->body = $requestBody;
$this->headerParameters = $headerParameters;
Expand All @@ -55,8 +55,8 @@ public function getUri(): string

public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
{
if ($this->body instanceof \stdClass) {
return [['Content-Type' => ['application/json']], json_encode($this->body)];
if ($this->body instanceof \Braze\Model\EmailBounceRemovePostBody) {
return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
}

return [[], null];
Expand Down
Loading
Loading