diff --git a/lib/Authentication/BearerAuthAuthentication.php b/lib/Authentication/BearerAuthAuthentication.php
new file mode 100644
index 0000000..370fd3d
--- /dev/null
+++ b/lib/Authentication/BearerAuthAuthentication.php
@@ -0,0 +1,34 @@
+{'token'} = $token;
+ }
+
+ public function authentication(\Psr\Http\Message\RequestInterface $request): \Psr\Http\Message\RequestInterface
+ {
+ $header = sprintf('Bearer %s', $this->{'token'});
+ $request = $request->withHeader('Authorization', $header);
+
+ return $request;
+ }
+
+ public function getScope(): string
+ {
+ return 'BearerAuth';
+ }
+}
diff --git a/lib/Braze.php b/lib/Braze.php
new file mode 100644
index 0000000..0a673fc
--- /dev/null
+++ b/lib/Braze.php
@@ -0,0 +1,37 @@
+createUri($apiUrl);
+ $bearer = new Bearer($apiKey);
+ $plugins = [
+ new AddHostPlugin($uri),
+ new AuthenticationPlugin($bearer),
+ ];
+ $httpClient = new PluginClient($httpClient, $plugins);
+ $this->client = Client::create($httpClient);
+ }
+}
diff --git a/lib/Client.php b/lib/Client.php
new file mode 100644
index 0000000..d1c9f78
--- /dev/null
+++ b/lib/Client.php
@@ -0,0 +1,8588 @@
+ Use this endpoint to update email templates on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.update` permission.
+ *
+ * You can access an email template’s `email_template_id` by navigating to it on the **Templates & Media** page. The [Create email template endpoint](https://www.braze.com/docs/api/endpoints/templates/email_templates/post_create_email_template/) will also return an `email_template_id` reference.
+ *
+ * All fields other than the `email_template_id` are optional, but you must specify at least one field to update.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email_template_id` | Required | String | Your [email template's API identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `template_name` | Optional | String | Name of your email template. |
+ * | `subject` | Optional | String | Email template subject line. |
+ * | `body` | Optional | String | Email template body that may include HTML. |
+ * | `plaintext_body` | Optional | String | A plaintext version of the email template body. |
+ * | `preheader` | Optional | String | Email preheader used to generate previews in some clients. |
+ * | `tags` | Optional | String | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ * | `should_inline_css` | Optional | Boolean | Enables or disables the `inline_css` feature per template. If not provided, Braze will use the default setting for the AppGroup. One of `true` or `false` is expected. |
+ *
+ * ### Possible errors
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps, if applicable.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | Template name is required | |
+ * | Tags must be an array | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | All tags must be strings | Make sure your tags are encapsulated in quotes (`""`). |
+ * | Some tags could not be found | To add a tag when creating an email template, the tag must already exist in Braze. |
+ * | Invalid value for `should_inline_css`. One of `true` or `false` was expected | This parameter only accepts boolean values (true or false). Make sure the value for `should_inline_css` is not encapsulated in quotes (`""`), which causes the value to be sent as a string instead. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateBadRequestException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateForbiddenException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateNotFoundException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateInternalServerErrorException
+ */
+ public function postTemplatesEmailUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostTemplatesEmailUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to record custom events, purchases, and update user profile attributes.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.track` permission.
+ *
+ **Note:** Braze processes the data passed via API at face value and customers should only pass deltas (changing data) to minimize unnecessary data point consumption. To read more, refer to [Data points](https://www.braze.com/docs/user_guide/onboarding_with_braze/data_points#data-points).
+ *
+ * Customers using the API for server-to-server calls may need to allowlist `rest.iad-01.braze.com` if they’re behind a firewall.
+ *
+ * ### Rate limit
+ *
+ * We apply a base speed limit of 50,000 requests per minute to this endpoint for all customers. Each request to the `/users/track` endpoint can contain up to 75 events, 75 attribute updates, and 75 purchases. Each component (event, attribute, and purchase arrays), can update up to 75 users each for a max of 225 individual data points. Each update can also belong to the same user for a max of 225 updates to a single user in a request.
+ *
+ * See our page on [API rate limits](https://www.braze.com/docs/api/api_limits/) for details, and reach out to your customer success manager if you need your limit increased.
+ *
+ * ### Request parameters
+ *
+ * For each of the request components listed in the following table, one of `external_id`, `user_alias`, or `braze_id` is required.
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `attributes` | Optional | Array of attributes objects | See [user attributes object](https://www.braze.com/docs/api/objects_filters/user_attributes_object/) |
+ * | `events` | Optional | Array of event objects | See [events object](https://www.braze.com/docs/api/objects_filters/event_object/) |
+ * | `purchases` | Optional | Array of purchase objects | See [purchases object](https://www.braze.com/docs/api/objects_filters/purchase_object/) |
+ *
+ * ## User track responses
+ *
+ * Upon using any of the aforementioned API requests you should receive one of the following three general responses:
+ *
+ * #### Successful message
+ *
+ * Successful messages will be met with the following response:
+ *
+ * ``` json
+ * {
+ * "message" : "success",
+ * "attributes_processed" : (optional, integer), if attributes are included in the request, this will return an integer of the number of external_ids with attributes that were queued to be processed,
+ * "events_processed" : (optional, integer), if events are included in the request, this will return an integer of the number of events that were queued to be processed,
+ * "purchases_processed" : (optional, integer), if purchases are included in the request, this will return an integer of the number of purchases that were queued to be processed,
+ * }
+ *
+ * ```
+ *
+ * #### Successful message with non-fatal errors
+ *
+ * If your message is successful but has non-fatal errors such as one invalid event object out of a long list of events, then you will receive the following response:
+ *
+ * ``` json
+ * {
+ * "message" : "success",
+ * "errors" : [
+ * {
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * #### Message with fatal errors
+ *
+ * In the case of a success, any data that was not affected by an error in the `errors` array will still be processed. If your message has a fatal error you will receive the following response:
+ *
+ * ``` json
+ * {
+ * "message" : ,
+ * "errors" : [
+ * {
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ### Fatal error response codes
+ *
+ * For status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/api/errors/#fatal-errors).
+ *
+ * If you receive the error “provided external_id is blacklisted and disallowed”, your request may have included a “dummy user”. For more information, refer to [Spam blocking](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_archival/#spam-blocking).
+ *
+ * ### Creating an alias-only user profile
+ *
+ * Keep the following nuances in mind when using the `/users/track` endpoint:
+ *
+ * You can use the `/users/track` endpoint to create a new alias-only user by setting the `_update_existing_only` key with a value of `false` in the body of the request. If this value is omitted, the alias-only user profile will not be created. Using an alias-only user guarantees that one profile with that alias will exist. This is especially helpful when building a new integration as it prevents the creation of duplicate user profiles.
+ *
+ * ### Importing legacy user data
+ *
+ * You may submit data through the Braze API for a user who has not yet used your mobile app in order to generate a user profile. If the user subsequently uses the application all information following their identification via the SDK will be merged with the existing user profile you created via the API call. Any user behavior that is recorded anonymously by the SDK prior to identification will be lost upon merging with the existing API-generated user profile.
+ *
+ * The segmentation tool will include these users regardless of whether they have engaged with the app. If you want to exclude users uploaded via the User API who have not yet engaged with the app, simply add the filter: `Session Count > 0`.
+ *
+ * ### Making bulk updates
+ *
+ * If you have a use case where you need to make batch updates to the `users/track` endpoint, we recommend adding the bulk update header so that Braze can properly identify, observe, and route your request.
+ *
+ * Refer to the following sample request with the `X-Braze-Bulk` header:
+ *
+ * ``` json
+ * curl --location --request POST 'https://rest.iad-01.braze.com/users/track' \
+ * --header 'Content-Type: application/json' \
+ * --header 'X-Braze-Bulk: true' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE' \
+ * --data-raw '{ "attributes": [ ], "events": [ ], "purchases": [ ] }'
+ *
+ * ```
+ *
+ * Warning: When the `X-Braze-Bulk` header is present with any value, Braze will consider the request a bulk request. Set the value to `true`. Currently, setting the value to `false` does not disable the header—it will still be treated as if it were true.
+ *
+ * #### Use cases
+ *
+ * Consider the following use cases where you may use the bulk update header:
+ *
+ * - A daily job where multiple users’ custom attributes are updated via the `/users/track` endpoint.
+ * - An ad-hoc user data backfill script which updates user information via the `/users/track` endpoint.
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersTrackBadRequestException
+ * @throws \Braze\Exception\PostUsersTrackUnauthorizedException
+ * @throws \Braze\Exception\PostUsersTrackForbiddenException
+ * @throws \Braze\Exception\PostUsersTrackNotFoundException
+ * @throws \Braze\Exception\PostUsersTrackTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersTrackInternalServerErrorException
+ */
+ public function postUsersTrack(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersTrack($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to delete a catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `200` and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `404` could return the following response body. Refer to [Troubleshooting](https://www.braze.com/docs/api/endpoints/catalogs/catalog_management/synchronous/delete_catalog/#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "catalog-not-found",
+ * "message": "Could not find catalog",
+ * "parameters": [
+ * "catalog_name"
+ * ],
+ * "parameter_values": [
+ * "restaurants"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameBadRequestException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameUnauthorizedException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameForbiddenException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameNotFoundException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameTooManyRequestsException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameInternalServerErrorException
+ */
+ public function deleteCatalogByCatalogName(string $catalogName, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\DeleteCatalogByCatalogName($catalogName, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return a list of catalogs in a workspace.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.get` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path and request parameters
+ *
+ * There are no path or request parameters for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "catalogs": [
+ * {
+ * "description": "My Restaurants",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Name",
+ * "type": "string"
+ * },
+ * {
+ * "name": "City",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Cuisine",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Rating",
+ * "type": "number"
+ * },
+ * {
+ * "name": "Loyalty_Program",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "Created_At",
+ * "type": "time"
+ * }
+ * ],
+ * "name": "restaurants",
+ * "num_items": 10,
+ * "updated_at": "2022-11-02T20:04:06.879+00:00"
+ * },
+ * {
+ * "description": "My Catalog",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "string_field",
+ * "type": "string"
+ * },
+ * {
+ * "name": "number_field",
+ * "type": "number"
+ * },
+ * {
+ * "name": "boolean_field",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "time_field",
+ * "type": "time"
+ * },
+ * ],
+ * "name": "my_catalog",
+ * "num_items": 3,
+ * "updated_at": "2022-11-02T09:03:19.967+00:00"
+ * },
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCatalogBadRequestException
+ * @throws \Braze\Exception\GetCatalogUnauthorizedException
+ * @throws \Braze\Exception\GetCatalogForbiddenException
+ * @throws \Braze\Exception\GetCatalogNotFoundException
+ * @throws \Braze\Exception\GetCatalogTooManyRequestsException
+ * @throws \Braze\Exception\GetCatalogInternalServerErrorException
+ */
+ public function getCatalog(array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCatalog($headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create a catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.create` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalogs` | Required | Array | An array that contains catalog objects. Only one catalog object is allowed for this request. |
+ *
+ * ### Catalog object parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `name` | Required | String | The name of the catalog that you want to create. |
+ * | `description` | Required | String | The description of the catalog that you want to create. |
+ * | `fields` | Required | Array | An array of objects where the object contains keys `name` and `type`. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/catalogs' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "catalogs": [
+ * {
+ * "name": "restaurants",
+ * "description": "My Restaurants",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Name",
+ * "type": "string"
+ * },
+ * {
+ * "name": "City",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Cuisine",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Rating",
+ * "type": "number"
+ * },
+ * {
+ * "name": "Loyalty_Program",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "Created_At",
+ * "type": "time"
+ * }
+ * ]
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `201` and `400`.
+ *
+ * ### Example success response
+ *
+ * The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "catalogs": [
+ * {
+ * "description": "My Restaurants",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Name",
+ * "type": "string"
+ * },
+ * {
+ * "name": "City",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Cuisine",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Rating",
+ * "type": "number"
+ * },
+ * {
+ * "name": "Loyalty_Program",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "Created_At",
+ * "type": "time"
+ * }
+ * ],
+ * "name": "restaurants",
+ * "num_items": 0,
+ * "updated_at": "2022-11-02T20:04:06.879+00:00"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "catalog-name-already-exists",
+ * "message": "A catalog with that name already exists",
+ * "parameters": [
+ * "name"
+ * ],
+ * "parameter_values": [
+ * "restaurants"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-array-invalid` | `catalogs` must be an array of objects. |
+ * | `catalog-name-already-exists` | Catalog with that name already exists. |
+ * | `catalog-name-too-large` | Character limit for a catalog name is 250. |
+ * | `description-too-long` | Character limit for description is 250. |
+ * | `field-names-not-unique` | The same field name is referenced twice. |
+ * | `field-names-too-large` | Character limit for a field name is 250. |
+ * | `id-not-first-column` | The `id` must be the first field in the array. Check that the type is a string. |
+ * | `invalid_catalog_name` | Catalog name can only include letters, numbers, hyphens, and underscores. |
+ * | `invalid-field-names` | Fields can only include letters, numbers, hyphens, and underscores. |
+ * | `invalid-field-types` | Make sure the field types are valid. |
+ * | `invalid-fields` | `fields` is not formatted correctly. |
+ * | `reached-company-catalogs-limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |
+ * | `too-many-catalog-atoms` | You can only create one catalog per request. |
+ * | `too-many-fields` | Number of fields limit is 30. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCatalogBadRequestException
+ * @throws \Braze\Exception\PostCatalogUnauthorizedException
+ * @throws \Braze\Exception\PostCatalogForbiddenException
+ * @throws \Braze\Exception\PostCatalogNotFoundException
+ * @throws \Braze\Exception\PostCatalogTooManyRequestsException
+ * @throws \Braze\Exception\PostCatalogInternalServerErrorException
+ */
+ public function postCatalog(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCatalog($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to delete multiple items in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete_items` permission.
+ *
+ * Each request can support up to 50 items. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain an `id` referencing the items Braze should delete. Up to 50 item objects are allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {"id": "restaurant1"},
+ * {"id": "restaurant2"},
+ * {"id": "restaurant3"}
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "items-missing-ids",
+ * "message": "There are 1 item(s) that do not have ids",
+ * "parameters": [],
+ * "parameter_values": []
+ * }
+ * ],
+ * "message": "Invalid Request",
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `ids-too-large` | Item IDs can't be more than 250 characters. |
+ * | `ids-not-unique` | Check that the item IDs are unique in the request. |
+ * | `ids-not-strings` | Item IDs must be of type string. |
+ * | `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |
+ * | `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |
+ * | `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ public function deleteCatalogsByCatalogNameItem(string $catalogName, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\DeleteCatalogsByCatalogNameItem($catalogName, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return multiple catalog items and their content.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.get_items` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Query parameters
+ *
+ * Note that each call to this endpoint will return 50 items. For a catalog with more than 50 items, use the `Link` header to retrieve the data on the next page as shown in the following example response.
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `cursor` | Optional | String | Determines the pagination of the catalog items. |
+ *
+ * ## Example requests
+ *
+ * ### Without cursor
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ### With cursor
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items?cursor=c2tpcDow' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response header and body.
+ *
+ * {% alert note %}
+ * The `Link` header won't exist if the catalog has less than or equal to 50 items. For calls without a cursor, `prev` will not show. When looking at the last page of items, `next` will not show.
+ * {% endalert %}
+ *
+ * ```
+ * Link: ; rel="prev",; rel="next"
+ *
+ * ```
+ *
+ * ``` json
+ * {
+ * "items": [
+ * {
+ * "id": "restaurant1",
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Open_Time": "2022-11-02T09:03:19.967Z"
+ * },
+ * {
+ * "id": "restaurant2",
+ * "Name": "Restaurant2",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 10,
+ * "Loyalty_Program": true,
+ * "Open_Time": "2022-11-02T09:03:19.967Z"
+ * },
+ * {
+ * "id": "restaurant3",
+ * "Name": "Restaurant3",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": false,
+ * "Open_Time": "2022-11-02T09:03:19.967Z"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-cursor",
+ * "message": "'cursor' is not valid",
+ * "parameters": [
+ * "cursor"
+ * ],
+ * "parameter_values": [
+ * "bad-cursor"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `invalid-cursor` | Check that your `cursor` is valid. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ public function getCatalogsByCatalogNameItem(string $catalogName, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCatalogsByCatalogNameItem($catalogName, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to delete multiple items in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete_items` permission.
+ *
+ * Each request can support up to 50 items. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain an `id` referencing the items Braze should delete. Up to 50 item objects are allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {"id": "restaurant1"},
+ * {"id": "restaurant2"},
+ * {"id": "restaurant3"}
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "items-missing-ids",
+ * "message": "There are 1 item(s) that do not have ids",
+ * "parameters": [],
+ * "parameter_values": []
+ * }
+ * ],
+ * "message": "Invalid Request",
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `ids-too-large` | Item IDs can't be more than 250 characters. |
+ * | `ids-not-unique` | Check that the item IDs are unique in the request. |
+ * | `ids-not-strings` | Item IDs must be of type string. |
+ * | `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |
+ * | `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |
+ * | `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ public function patchCatalogsByCatalogNameItem(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PatchCatalogsByCatalogNameItem($catalogName, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create multiple items in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.add_items` permission.
+ *
+ * Each request can support up to 50 items. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain all of the fields in the catalog. Up to 50 item objects are allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "id": "restaurant1",
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Created_At": "2022-11-01T09:03:19.967+00:00"
+ * },
+ * {
+ * "id": "restaurant2",
+ * "Name": "Restaurant2",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 10,
+ * "Loyalty_Program": true,
+ * "Created_At": "2022-11-02T09:03:19.967+00:00"
+ * },
+ * {
+ * "id": "restaurant3",
+ * "Name": "Restaurant3",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 3,
+ * "Loyalty_Program": false,
+ * "Created_At": "2022-11-03T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "fields-do-not-match",
+ * "message": "Fields do not match with fields on the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant2"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `ids-not-strings` | Item IDs must be of type string. |
+ * | `ids-not-unique` | Item IDs must be unique in the request. |
+ * | `ids-too-large` | Item IDs can't be more than 250 characters. |
+ * | `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |
+ * | `invalid-fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |
+ * | `item-array-invalid` | `items` must be an array of objects. |
+ * | `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |
+ * | `items-too-large` | Item values can't exceed 5,000 characters. |
+ * | `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |
+ * | `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable-to-coerce-value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ public function postCatalogsByCatalogNameItem(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCatalogsByCatalogNameItem($catalogName, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to send Canvas messages via API-triggered delivery.
+ *
+ * To use this endpoint, you'll need to generate an API key with the `catalogs.replace_item` permission.
+ *
+ * API-triggered Delivery allows you to store message content in the Braze dashboard while dictating when a message is sent, and to whom via your API.
+ *
+ * Note that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier), created when you build a Canvas.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example request
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-fields",
+ * "message": "Some of the fields given do not exist in the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant1"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog_not_found` | Check that the catalog name is valid. |
+ * | `ids_not_string` | Confirm that each item ID is a string. |
+ * | `ids_not_unique` | Check that each item ID is unique. |
+ * | `ids_too_large` | Character limit for each item ID is 250 characters. |
+ * | `item_array_invalid` | `items` must be an array of objects. |
+ * | `items_missing_ids` | Confirm that each item has an ID. |
+ * | `items_too_large` | Item values can't exceed 5,000 characters. |
+ * | `invalid_ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid_fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid_keys_in_value_object` | Item object keys can't include `.` or `$`. |
+ * | `too_deep_nesting_in_value_object` | Item objects can't have more than 50 levels of nesting.
+ * | `request_includes_too_many_items` | Your request has too many items. The item limit per request is 50. |
+ * | `unable_to_coerce_value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ public function putCatalogsByCatalogNameItem(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PutCatalogsByCatalogNameItem($catalogName, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to delete an item in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete_item` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "item-not-found",
+ * "message": "Could not find item",
+ * "parameters": [
+ * "item_id"
+ * ],
+ * "parameter_values": [
+ * "restaurant34"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `item-not-found` | Check that the item to be deleted exists in your catalog. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ public function deleteCatalogsByCatalogNameItemByItemId(string $catalogName, string $itemId, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\DeleteCatalogsByCatalogNameItemByItemId($catalogName, $itemId, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return a catalog item and its content.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.get_item` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `200` and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "items": [
+ * {
+ * "id": "restaurant3",
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Open_Time": "2022-11-01T09:03:19.967Z"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `404` could return the following response. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "item-not-found",
+ * "message": "Could not find item",
+ * "parameters": [
+ * "item_id"
+ * ],
+ * "parameter_values": [
+ * "restaurant34"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps, if applicable.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `item-not-found` | Check that the item is in the catalog. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ public function getCatalogsByCatalogNameItemByItemId(string $catalogName, string $itemId, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCatalogsByCatalogNameItemByItemId($catalogName, $itemId, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to edit an item in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.update_item` permission.
+ *
+ * ## Rate Limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request PATCH 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "Name": "Restaurant",
+ * "Loyalty_Program": false,
+ * "Open_Time": "2021-09-03T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-fields",
+ * "message": "Some of the fields given do not exist in the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant1"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |
+ * | `id-in-body` | An item ID already exists in the catalog. |
+ * | `ids-too-large` | Character limit for each item ID is 250 characters. |
+ * | `invalid-ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid-fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |
+ * | `item-not-found` | Check that the item is in the catalog. |
+ * | `item-array-invalid` | `items` must be an array of objects. |
+ * | `items-too-large` | Character limit for each item is 5,000 characters. |
+ * | `request-includes-too-many-items` | You can only edit one catalog item per request. |
+ * | `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable-to-coerce-value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ public function patchCatalogsByCatalogNameItemByItemId(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PatchCatalogsByCatalogNameItemByItemId($catalogName, $itemId, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create an item in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.create_item` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain all of the fields in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example Request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Created_At": "2022-11-01T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `201`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "fields-do-not-match",
+ * "message": "Fields do not match with fields on the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant2"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `already-reached-catalog-item-limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |
+ * | `already-reached-company-item-limit` | Maximum number of catalog items reached. Contact your Braze account manager for more information. |
+ * | `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |
+ * | `id-in-body` | Remove any item IDs in the request body. |
+ * | `ids-too-large` | Character limit for each item ID is 250 characters. |
+ * | `invalid-ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid-fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |
+ * | `item-already-exists` | The item already exists in the catalog. |
+ * | `item-array-invalid` | `items` must be an array of objects. |
+ * | `items-too-large` | Character limit for each item is 5,000 characters. |
+ * | `request-includes-too-many-items` | You can only create one catalog item per request. |
+ * | `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable-to-coerce-value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ public function postCatalogsByCatalogNameItemByItemId(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCatalogsByCatalogNameItemByItemId($catalogName, $itemId, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update an item in your catalog.
+ *
+ * To use this endpoint, you'll need to generate an API key with the `catalogs.replace_item` permission.
+ *
+ * If the `item_id` isn't found, this endpoint will create the item. This endpoint is synchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request PUT 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "Name": "Restaurant",
+ * "Loyalty_Program": false,
+ * "Location": {
+ * "Latitude": 33.6112,
+ * "Longitude": -117.8711
+ * },
+ * "Open_Time": "2021-09-03T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-fields",
+ * "message": "Some of the fields given do not exist in the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant1"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `already_reached_catalog_item_limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |
+ * | `already_reached_company_item_limit` | Maximum number of items reached. Contact your Braze account manager for more information. |
+ * | `arbitrary_error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog_not_found` | Check that the catalog name is valid. |
+ * | `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |
+ * | `id_in_body` | Remove any item IDs in the request body. |
+ * | `ids_too_large` | Character limit for each item ID is 250 characters. |
+ * | `invalid_ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid_fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid_keys_in_value_object` | Item object keys can't include `.` or `$`. |
+ * | `item_already_exists` | The item already exists in the catalog. |
+ * | `item_array_invalid` | `items` must be an array of objects. |
+ * | `items_too_large` | Item values can't exceed 5,000 characters. |
+ * | `request_includes_too_many_items` | Your request has too many items. The item limit per request is 50. |
+ * | `too_deep_nesting_in_value_object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable_to_coerce_value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ public function putCatalogsByCatalogNameItemByItemId(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PutCatalogsByCatalogNameItemByItemId($catalogName, $itemId, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to pull a list of email addresses that have “hard bounced” your email messages within a certain time frame.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.hard_bounces` permission.
+ *
+ **Note:** You must provide an `end_date`, as well as either an `email` or a `start_date`. If you provide all three, `start_date`, `end_date`, and an `email`, we prioritize the emails given and disregard the date range.
+ *
+ * If your date range has more than `limit` number of hard bounces, you will need to make multiple API calls, each time increasing the `offset` until a call returns either fewer than `limit` or zero results.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/email/hard_bounces?start_date=2019-01-01&end_date=2019-02-01&limit=100&offset=1&email=example@braze.com' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * Entries are listed in descending order.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "emails": [
+ * {
+ * "email": "example1@braze.com",
+ * "hard_bounced_at": "2016-08-25 15:24:32 +0000"
+ * },
+ * {
+ * "email": "example2@braze.com",
+ * "hard_bounced_at": "2016-08-24 17:41:58 +0000"
+ * },
+ * {
+ * "email": "example3@braze.com",
+ * "hard_bounced_at": "2016-08-24 12:01:13 +0000"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $start_date (Optional*) String in YYYY-MM-DD format
+ *
+ * Start date of the range to retrieve hard bounces, must be earlier than `end_date`. This is treated as midnight in UTC time by the API.
+ *
+ *You must provide either an `email` or a `start_date`, and an `end_date`.
+ * @var string $end_date (Optional*) String in YYYY-MM-DD format
+ *
+ * String in YYYY-MM-DD format. End date of the range to retrieve hard bounces. This is treated as midnight in UTC time by the API.
+ *
+ *You must provide either an `email` or a `start_date`, and an `end_date`.
+ * @var int $limit (Optional) Integer
+ *
+ * Optional field to limit the number of results returned. Defaults to 100, maximum is 500.
+ * @var int $offset (Optional) Integer
+ *
+ * Optional beginning point in the list to retrieve from
+ * @var string $email (Optional*) String
+ *
+ * If provided, we will return whether or not the user has hard bounced.
+ *
+ *You must provide either an `email` or a `start_date`, and an `end_date`.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetEmailHardBounceBadRequestException
+ * @throws \Braze\Exception\GetEmailHardBounceUnauthorizedException
+ * @throws \Braze\Exception\GetEmailHardBounceForbiddenException
+ * @throws \Braze\Exception\GetEmailHardBounceNotFoundException
+ * @throws \Braze\Exception\GetEmailHardBounceTooManyRequestsException
+ * @throws \Braze\Exception\GetEmailHardBounceInternalServerErrorException
+ */
+ public function getEmailHardBounce(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetEmailHardBounce($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return emails that have unsubscribed during the time period from `start_date` to `end_date`.
+ *
+ * You can use this endpoint to set up a bi-directional sync between Braze and other email systems or your own database.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.unsubscribe` permission.
+ *
+ **Note:** You must provide an `end_date`, as well as either an `email` or a `start_date`.
+ *
+ * If your date range has more than `limit` number of unsubscribes, you will need to make multiple API calls, each time increasing the `offset` until a call returns either fewer than `limit` or zero results.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/email/unsubscribes?start_date=2020-01-01&end_date=2020-02-01&limit=1&offset=1&sort_direction=desc&email=example@braze.com' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * Entries are listed in descending order.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "emails": [
+ * {
+ * "email": "example1@braze.com",
+ * "unsubscribed_at": "2016-08-25 15:24:32 +0000"
+ * },
+ * {
+ * "email": "example2@braze.com",
+ * "unsubscribed_at": "2016-08-24 17:41:58 +0000"
+ * },
+ * {
+ * "email": "example3@braze.com",
+ * "unsubscribed_at": "2016-08-24 12:01:13 +0000"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $start_date (Optional*) String in YYYY-MM-DD format
+ *
+ * Start date of the range to retrieve unsubscribes, must be earlier than end_date. This is treated as midnight in UTC time by the API.
+ * @var string $end_date (Optional*) String in YYYY-MM-DD format
+ *
+ * End date of the range to retrieve unsubscribes. This is treated as midnight in UTC time by the API.
+ * @var int $limit (Optional) Integer
+ *
+ * Optional field to limit the number of results returned. Limit must be greater than 1. Defaults to 100, maximum is 500.
+ * @var int $offset (Optional) Integer
+ *
+ * Optional beginning point in the list to retrieve from
+ * @var string $sort_direction (Optional) String
+ *
+ * Pass in the value `asc` to sort unsubscribes from oldest to newest. Pass in `desc` to sort from newest to oldest. If sort_direction is not included, the default order is newest to oldest.
+ * @var string $email (Optional*) String
+ *
+ * If provided, we will return whether or not the user has unsubscribed.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetEmailUnsubscribeBadRequestException
+ * @throws \Braze\Exception\GetEmailUnsubscribeUnauthorizedException
+ * @throws \Braze\Exception\GetEmailUnsubscribeForbiddenException
+ * @throws \Braze\Exception\GetEmailUnsubscribeNotFoundException
+ * @throws \Braze\Exception\GetEmailUnsubscribeTooManyRequestsException
+ * @throws \Braze\Exception\GetEmailUnsubscribeInternalServerErrorException
+ */
+ public function getEmailUnsubscribe(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetEmailUnsubscribe($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to set the email subscription state for your users. Users can be `opted_in`, `unsubscribed`, or `subscribed` (not specifically opted in or out).
+ *
+ * You can set the email subscription state for an email address that is not yet associated with any of your users within Braze. When that email address is subsequently associated with a user, the email subscription state that you uploaded will be automatically set.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.status` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to modify, or an array of up to 50 email addresses to modify. |
+ * | `subscription_state` | Required | String | Either “subscribed”, “unsubscribed”, or “opted_in”. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostEmailStatusBadRequestException
+ * @throws \Braze\Exception\PostEmailStatusUnauthorizedException
+ * @throws \Braze\Exception\PostEmailStatusForbiddenException
+ * @throws \Braze\Exception\PostEmailStatusNotFoundException
+ * @throws \Braze\Exception\PostEmailStatusTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailStatusInternalServerErrorException
+ */
+ public function postEmailStatus(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostEmailStatus($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to remove email addresses from your Braze bounce list.
+ *
+ * We will also remove them from the bounce list maintained by your email provider.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.bounce.remove` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to modify, or an array of up to 50 email addresses to modify. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostEmailBounceRemoveBadRequestException
+ * @throws \Braze\Exception\PostEmailBounceRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostEmailBounceRemoveForbiddenException
+ * @throws \Braze\Exception\PostEmailBounceRemoveNotFoundException
+ * @throws \Braze\Exception\PostEmailBounceRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailBounceRemoveInternalServerErrorException
+ */
+ public function postEmailBounceRemove(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostEmailBounceRemove($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to remove email addresses from your Braze spam list.
+ *
+ * We will also remove them from the spam list maintained by your email provider.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.spam.remove` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to modify, or an array of up to 50 email addresses to modify. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostEmailSpamRemoveBadRequestException
+ * @throws \Braze\Exception\PostEmailSpamRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostEmailSpamRemoveForbiddenException
+ * @throws \Braze\Exception\PostEmailSpamRemoveNotFoundException
+ * @throws \Braze\Exception\PostEmailSpamRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailSpamRemoveInternalServerErrorException
+ */
+ public function postEmailSpamRemove(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostEmailSpamRemove($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to unsubscribe a user from email and mark them as hard bounced.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.blacklist` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to blacklist, or an array of up to 50 email addresses to blocklist. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostEmailBlocklistBadRequestException
+ * @throws \Braze\Exception\PostEmailBlocklistUnauthorizedException
+ * @throws \Braze\Exception\PostEmailBlocklistForbiddenException
+ * @throws \Braze\Exception\PostEmailBlocklistNotFoundException
+ * @throws \Braze\Exception\PostEmailBlocklistTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailBlocklistInternalServerErrorException
+ */
+ public function postEmailBlocklist(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostEmailBlocklist($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to unsubscribe a user from email and mark them as hard bounced.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.blacklist` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to blacklist, or an array of up to 50 email addresses to blocklist. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostEmailBlacklistBadRequestException
+ * @throws \Braze\Exception\PostEmailBlacklistUnauthorizedException
+ * @throws \Braze\Exception\PostEmailBlacklistForbiddenException
+ * @throws \Braze\Exception\PostEmailBlacklistNotFoundException
+ * @throws \Braze\Exception\PostEmailBlacklistTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailBlacklistInternalServerErrorException
+ */
+ public function postEmailBlacklist(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostEmailBlacklist($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of various stats for a campaign over time.
+ *
+ * Data returned includes how many messages were sent, opened, clicked, or converted by messaging channel.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.data_series` permission.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `campaign_id` can be found at **Developer Console > API Settings**.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Responses
+ *
+ * ### Multichannel response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) date as ISO 8601 date,
+ * "messages" : {
+ * "ios_push" : [
+ * {
+ * "variation_name": "iOS_Push",
+ * "sent" : (int),
+ * "direct_opens" : (int),
+ * "total_opens" : (int),
+ * "bounces" : (int),
+ * "body_clicks" : (int)
+ * "revenue": 0,
+ * "unique_recipients": 1,
+ * "conversions": 0,
+ * "conversions_by_send_time": 0,
+ * "conversions1": 0,
+ * "conversions1_by_send_time": 0,
+ * "conversions2": 0,
+ * "conversions2_by_send_time": 0,
+ * "conversions3": 0,
+ * "conversions3_by_send_time": 0,
+ * "carousel_slide_[NUM]_[TITLE]_click": (optional, int),
+ * "notif_button_[NUM]_[TITLE]_click": (optional, int)
+ * }
+ * ],
+ * "android_push" : [
+ * {
+ * "sent" : (int),
+ * "direct_opens" : (int),
+ * "total_opens" : (int),
+ * "bounces" : (int),
+ * "body_clicks" : (int)
+ * }
+ * ],
+ * "webhook": [
+ * {
+ * "sent": (int),
+ * "errors": (int)
+ * }
+ * ],
+ * "email" : [
+ * {
+ * "sent": (int),
+ * "opens": (int),
+ * "unique_opens": (int),
+ * "clicks": (int),
+ * "unique_clicks": (int),
+ * "unsubscribes": (int),
+ * "bounces": (int),
+ * "delivered": (int),
+ * "reported_spam": (int)
+ * }
+ * ],
+ * "sms" : [
+ * {
+ * "sent": (int),
+ * "delivered": (int),
+ * "undelivered": (int),
+ * "delivery_failed": (int)
+ * }
+ * ]
+ * },
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3_by_send_time": (optional, int),
+ * "conversions": (int),
+ * "conversions1": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions3": (optional, int),
+ * "unique_recipients": (int),
+ * "revenue": (optional, float)
+ * },
+ * ...
+ * ],
+ * ...
+ * }
+ *
+ * ```
+ *
+ * ### Multivariate response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "data" : [
+ * {
+ * "time" : (string) date as ISO 8601 date,
+ * "conversions" : (int),
+ * "revenue": (float),
+ * "conversions_by_send_time": (int),
+ * "messages" : {
+ * "trigger_in_app_message": [{
+ * "variation_name": (optional, string),
+ * "impressions": (int),
+ * "clicks": (int),
+ * "first_button_clicks": (int),
+ * "second_button_clicks": (int),
+ * "revenue": (optional, float),,
+ * "unique_recipients": (int),
+ * "conversions": (optional, int),
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3": (optional, int),
+ * "conversions3_by_send_time": (optional, int)
+ * }, {
+ * "variation_name": (optional, string),
+ * "impressions": (int),
+ * "clicks": (int),
+ * "first_button_clicks": (int),
+ * "second_button_clicks": (int),
+ * "revenue": (optional, float),,
+ * "unique_recipients": (int),
+ * "conversions": (optional, int),
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3": (optional, int).
+ * "conversions3_by_send_time": (optional, int)
+ * }, {
+ * "variation_name": (optional, string),
+ * "revenue": (optional, float),,
+ * "unique_recipients": (int),
+ * "conversions": (optional, int),
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3": (optional, int),
+ * "conversions3_by_send_time": (optional, int),
+ * "enrolled": (optional, int)
+ * }]
+ * },
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3_by_send_time": (optional, int),
+ * "conversions": (optional, int,
+ * "conversions1": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions3": (optional, int),
+ * "unique_recipients": (int),
+ * "revenue": (optional, float)
+ * }],
+ * ...
+ * }
+ *
+ * ```
+ *
+ * Possible message types are `email`, `in_app_message`, `webhook`, `android_push`, ios_push, `kindle_push`, `web_push`. All push message types will have the same statistics shown for `android_push`.
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $campaign_id (Required) String
+ *
+ * See [campaign API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `campaign_id` for API campaigns can be found at **Settings > Setup and Testing > API Keys** and the **Campaign Details** page within your dashboard, or you can use the [List campaigns endpoint](https://www.braze.com/docs/api/endpoints/export/campaigns/get_campaigns/).
+ * @var int $length (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCampaignsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesInternalServerErrorException
+ */
+ public function getCampaignsDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCampaignsDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve relevant information on a specified campaign, which can be identified by the `campaign_id`.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaign.details` permission.
+ *
+ * If you want to retrieve Canvas data, refer to the [Canvas Details](https://www.braze.com/docs/api/endpoints/export/canvas/get_canvas_details/) endpoint.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `campaign_id` can be found at **Developer Console** > **API Settings**
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Responses
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "created_at" : (string) the date created as ISO 8601 date,
+ * "updated_at" : (string) the date last updated as ISO 8601 date,
+ * "archived": (boolean) whether this campaign is archived,
+ * "draft": (boolean) whether this campaign is a draft,
+ * "name" : (string) the campaign name,
+ * "description" : (string) the campaign description,
+ * "schedule_type" : (string) the type of scheduling action,
+ * "channels" : (array) the list of channels to send via,
+ * "first_sent" : (string) the date and hour of first sent as ISO 8601 date,
+ * "last_sent" : (string) the date and hour of last sent as ISO 8601 date,
+ * "tags" : (array) the tag names associated with the campaign,
+ * "messages": {
+ * "message_variation_id": (string) { // <=This is the actual id
+ * "channel": (string) the channel type of the message, must be either email, ios_push, webhook, content_card, in-app_message, or sms,
+ * "name": (string) the name of the message in the dashboard (eg., "Variation 1")
+ * ... channel-specific fields for this message, see the following messages section ...
+ * }
+ * },
+ * "conversion_behaviors": (array) the conversion event behaviors assigned to the campaign, see the following conversions behavior section.
+ * }
+ *
+ * ```
+ *
+ * ### Messages
+ *
+ * The `messages` response will contain information about each message. The following includes example message responses for each channel:
+ *
+ * #### Push channels
+ *
+ * ``` json
+ * {
+ * "channel": (string) description of the channel, such as "ios_push" or "android_push"
+ * "alert": (string) alert body text,
+ * "extras": (hash) any key value pairs provided
+ * }
+ *
+ * ```
+ *
+ * #### Email channel
+ *
+ * ``` json
+ * {
+ * "channel": "email",
+ * "subject": (string) subject,
+ * "body": (string) HTML body,
+ * "from": (string) from address and display name,
+ * "reply_to": (string) reply-to for message, if different than "from" address,
+ * "title": (string) name of the email,
+ * "extras": (hash) any key value pairs provided
+ * }
+ *
+ * ```
+ *
+ * #### In-app message channel
+ *
+ * ``` json
+ * {
+ * "type": (string) description of in-app message type, such as "survey",
+ * "data": {
+ * "pages": [
+ * {
+ * "header":
+ * {
+ * "text":(string) display text for the header of the survey,
+ * }
+ * "choices": [
+ * {
+ * "choice_id": (string) choice identifier,
+ * "text": (string) display text,
+ * "custom_attribute_key": (string) custom attribute key,
+ * "custom_attribute_value": (sting) custom attribute value,
+ * "deleted": (boolean) deleted from live campaign,
+ * },
+ * ...
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * #### Content Card channel
+ *
+ * ``` json
+ * {
+ * "channel": "content_cards",
+ * "name": (string) name of variant,
+ * "extras": (hash) any key value pairs provided; only present if at least one key-value pair has been set
+ * }
+ *
+ * ```
+ *
+ * #### Webhook channel
+ *
+ * ``` json
+ * {
+ * "channel": "webhook",
+ * "url": (string) url for webhook,
+ * "body": (string) payload body,
+ * "type": (string) body content type,
+ * "headers": (hash) specified request headers,
+ * "method": (string) HTTP method (e.g., "POST" or "GET"),
+ * }
+ *
+ * ```
+ *
+ * #### SMS channel
+ *
+ * ``` json
+ * {
+ * "channel": "sms",
+ * "body": (string) payload body,
+ * "from": (string) list of numbers associated with the subscription group,
+ * "subscription_group_id": (string) API id of the subscription group targeted in the SMS message
+ * }
+ *
+ * ```
+ *
+ * #### Control Messages
+ *
+ * ``` json
+ * {
+ * "channel": (string) description of the channel that the control is for,
+ * "type": "control"
+ * }
+ *
+ * ```
+ *
+ * ### Conversion Behaviors
+ *
+ * The `conversion_behaviors` array will contain information about each conversion event behavior set for the campaign. These behaviors are in order as set by the campaign. For example, Conversion Event A will be the first item in the array, Conversion Event B will be second, etc. The following lists example conversion event behavior responses:
+ *
+ * #### Clicks email
+ *
+ * ``` json
+ * {
+ * "type": "Clicks Email",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours
+ * }
+ *
+ * ```
+ *
+ * #### Opens email
+ *
+ * ``` json
+ * {
+ * "type": "Opens Email",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours
+ * }
+ *
+ * ```
+ *
+ * #### Makes purchase (any purchase)
+ *
+ * ``` json
+ * {
+ * "type": "Makes Any Purchase",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours
+ * }
+ *
+ * ```
+ *
+ * #### Makes purchase (specific product)
+ *
+ * ``` json
+ * {
+ * "type": "Makes Specific Purchase",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "product": (string) name of the product, i.e. - "Feline Body Armor"
+ * }
+ *
+ * ```
+ *
+ * #### Performs custom event
+ *
+ * ``` json
+ * {
+ * "type": "Performs Custom Event",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "custom_event_name": (string) name of the event, i.e. - "Used Feline Body Armor"
+ * }
+ *
+ * ```
+ *
+ * #### Upgrades app
+ *
+ * ``` json
+ * {
+ * "type": "Upgrades App",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "app_ids": (array|null) array of app ids, i.e. - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
+ * }
+ *
+ * ```
+ *
+ * #### Uses app
+ *
+ * ``` json
+ * {
+ * "type": "Starts Session",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "app_ids": (array|null) array of app ids, i.e. - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $campaign_id (Required) String
+ *
+ * See [campaign API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `campaign_id` for API campaigns can be found on the **Settings > Setup and Testing > API Keys** and the campaign details page within your dashboard, or you can use the [Campaign List Endpoint](https://www.braze.com/docs/api/endpoints/export/campaigns/get_campaign_analytics/#campaign-list-endpoint).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCampaignsDetailBadRequestException
+ * @throws \Braze\Exception\GetCampaignsDetailUnauthorizedException
+ * @throws \Braze\Exception\GetCampaignsDetailForbiddenException
+ * @throws \Braze\Exception\GetCampaignsDetailNotFoundException
+ * @throws \Braze\Exception\GetCampaignsDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetCampaignsDetailInternalServerErrorException
+ */
+ public function getCampaignsDetail(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCampaignsDetail($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export a list of campaigns, each of which will include its name, campaign API identifier, whether it is an API campaign, and tags associated with the campaign.
+ *
+ * The campaigns are returned in groups of 100 sorted by time of creation (oldest to newest by default).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.list` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Campaign list endpoint API response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "campaigns" : [
+ * {
+ * "id" : (string) Campaign API Identifier,
+ * "last_edited": (ISO 8601 string) the last edited time for the message
+ * "name" : (string) campaign name,
+ * "is_api_campaign" : (boolean) whether the campaign is an API Campaign,
+ * "tags" : (array) tag names associated with the campaign
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of campaigns to return, defaults to 0 (returns the first set of up to 100)
+ * @var bool $include_archived (Optional) Boolean
+ *
+ * Whether or not to include archived campaigns, defaults to false
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * @var string $last_edit.time[gt] (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Filters the results and only returns campaigns that were edited greater than the time provided till now. Format is `yyyy-MM-DDTHH:mm:ss`.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCampaignsListBadRequestException
+ * @throws \Braze\Exception\GetCampaignsListUnauthorizedException
+ * @throws \Braze\Exception\GetCampaignsListForbiddenException
+ * @throws \Braze\Exception\GetCampaignsListNotFoundException
+ * @throws \Braze\Exception\GetCampaignsListTooManyRequestsException
+ * @throws \Braze\Exception\GetCampaignsListInternalServerErrorException
+ */
+ public function getCampaignsList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCampaignsList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of various stats for a tracked `send_id`.
+ *
+ * Braze stores send analytics for 14 days after the send.
+ *
+ * Campaign conversions will be attributed towards the most recent send id that a given user has received from the campaign.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sends.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ### Send analytics endpoint API response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "variation_name": (string) variation name,
+ * "sent": (int) the number of sends,
+ * "delivered": (int) the number of messages successfully delivered,
+ * "undelivered": (int) the number of undelivered,
+ * "delivery_failed": (int) the number of rejected,
+ * "direct_opens": (int) the number of direct opens,
+ * "total_opens": (int) the number of total opens,
+ * "bounces": (int) the number of bounces,
+ * "body_clicks": (int) the number of body clicks,
+ * "revenue": (float) the number of dollars of revenue (USD),
+ * "unique_recipients": (int) the number of unique recipients,
+ * "conversions": (int) the number of conversions,
+ * "conversions_by_send_time": (int) the number of conversions,
+ * "conversions1": (int, optional) the number of conversions for the second conversion event,
+ * "conversions1_by_send_time": (int, optional) the number of conversions for the second conversion event by send time,
+ * "conversions2": (int, optional) the number of conversions for the third conversion event,
+ * "conversions2_by_send_time": (int, optional) the number of conversions for the third conversion event by send time,
+ * "conversions3": (int, optional) the number of conversions for the fourth conversion event,
+ * "conversions3_by_send_time": (int, optional) the number of conversions for the fourth conversion event by send time
+ * }
+ * ]
+ * },
+ * "conversions_by_send_time": 0,
+ * "conversions1_by_send_time": 0,
+ * "conversions2_by_send_time": 0,
+ * "conversions3_by_send_time": 0,
+ * "conversions": 0,
+ * "conversions1": 0,
+ * "conversions2": 0,
+ * "conversions3": 0,
+ * "unique_recipients": 1,
+ * "revenue": 0
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string (Required) String
+ *
+ * See [Campaign API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var string (Required) String
+ *
+ * See [Send API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var int (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSendsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetSendsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetSendsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetSendsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetSendsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetSendsDataSeriesInternalServerErrorException
+ */
+ public function getSendsDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSendsDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export time series data for a Canvas.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "data": {
+ * "name": (string) Canvas name,
+ * "stats": [
+ * {
+ * "time": (string) date as ISO 8601 date,
+ * "total_stats": {
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "entries": (int)
+ * },
+ * "variant_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for variant) {
+ * "name": (string) name of variant,
+ * "revenue": (int),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "entries": (int)
+ * },
+ * ... (more variants)
+ * },
+ * "step_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for step) {
+ * "name": (string) name of step,
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "messages": {
+ * "email": [
+ * {
+ * "sent": (int),
+ * "opens": (int),
+ * "unique_opens": (int),
+ * "clicks": (int),
+ * ... (more stats)
+ * }
+ * ],
+ * ... (more channels)
+ * }
+ * },
+ * ... (more steps)
+ * }
+ * },
+ * ... (more stats by time)
+ * ]
+ * },
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $canvas_id (Required) String
+ *
+ * See [Canvas API Identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var string $ending_at (Required) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data export should end. Defaults to time of the request.
+ * @var string $starting_at (Optional*) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data export should begin.
+ *
+ *Either `length` or `starting_at` is required.
+ * @var int $length (Optional*) String
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 14 (inclusive).
+ *
+ *Either `length` or `starting_at` is required.
+ * @var bool $include_variant_breakdown (Optional) Boolean
+ *
+ * Whether or not to include variant stats (defaults to false)
+ * @var bool $include_step_breakdown (Optional) Boolean
+ *
+ * Whether or not to include step stats (defaults to false)
+ * @var bool $include_deleted_step_data (Optional) Boolean
+ *
+ * Whether or not to include step stats for deleted steps (defaults to false).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCanvasDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetCanvasDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetCanvasDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetCanvasDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasDataSeriesInternalServerErrorException
+ */
+ public function getCanvasDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCanvasDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export rollups of time series data for a Canvas, providing a concise summary of a Canvas’ results.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.data_summary` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "data": {
+ * "name": (string) Canvas name,
+ * "total_stats": {
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "entries": (int)
+ * },
+ * "variant_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for variant) {
+ * "name": (string) name of variant,
+ * "revenue": (float),
+ * "conversions": (int),
+ * "entries": (int)
+ * },
+ * ... (more variants)
+ * },
+ * "step_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for step) {
+ * "name": (string) name of step,
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "messages": {
+ * "android_push": (name of channel) [
+ * {
+ * "sent": (int),
+ * "opens": (int),
+ * "influenced_opens": (int),
+ * "bounces": (int)
+ * ... (more stats for channel)
+ * }
+ * ],
+ * ... (more channels)
+ * }
+ * },
+ * ... (more steps)
+ * }
+ * },
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://desktop.postman.com/?desktopVersion=9.19.0&userId=16580579&teamId=409325).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $canvas_id (Required) String
+ *
+ * See [Canvas API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var string $ending_at (Required) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ * Date on which the data export should end. Defaults to time of the request
+ * @var string $starting_at (Optional*) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data export should begin.
+ *
+ *Either `length` or `starting_at` is required.
+ * @var int $length (Optional*) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series. Must be between 1 and 14 (inclusive).
+ *
+ *Either `length` or `starting_at` is required.
+ * @var bool $include_variant_breakdown (Optional) Boolean
+ *
+ * Whether or not to include variant stats (defaults to false)
+ * @var bool $include_step_breakdown (Optional) Boolean
+ *
+ * Whether or not to include step stats (defaults to false)
+ * @var bool $include_deleted_step_data (Optional) Boolean
+ *
+ * Whether or not to include step stats for deleted steps (defaults to false).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCanvasDataSummaryBadRequestException
+ * @throws \Braze\Exception\GetCanvasDataSummaryUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasDataSummaryForbiddenException
+ * @throws \Braze\Exception\GetCanvasDataSummaryNotFoundException
+ * @throws \Braze\Exception\GetCanvasDataSummaryTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasDataSummaryInternalServerErrorException
+ */
+ public function getCanvasDataSummary(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCanvasDataSummary($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export metadata about a Canvas, such as the name, time created, current status, and more.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.details` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * Note: All Canvas steps have a next_paths field, which is an array of `{name, next_step_id}` data. For full steps and Message steps, the `next_step_ids` field will be present, but will not contain data for other Canvas Flow steps.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "created_at": (string) date created as ISO 8601 date,
+ * "updated_at": (string) date updated as ISO 8601 date,
+ * "name": (string) Canvas name,
+ * "description": (string) Canvas description,
+ * "archived": (boolean) whether this Canvas is archived,
+ * "draft": (boolean) whether this Canvas is a draft,
+ * "schedule_type": (string) type of scheduling action,
+ * "first_entry": (string) date of first entry as ISO 8601 date,
+ * "last_entry": (string) date of last entry as ISO 8601 date,
+ * "channels": (array of strings) step channels used with Canvas,
+ * "variants": [
+ * {
+ * "name": (string) name of variant,
+ * "id": (string) API identifier of the variant,
+ * "first_step_ids": (array of strings) API identifiers for first steps in variant,
+ * "first_step_id": (string) API identifier of first step in variant (deprecated in November 2017, only included if the variant has only one first step)
+ * },
+ * ... (more variations)
+ * ],
+ * "tags": (array of strings) tag names associated with the Canvas,
+ * "steps": [
+ * {
+ * "name": (string) name of step,
+ * "id": (string) API identifier of the step,
+ * "next_step_ids": (array of strings) API identifiers of steps following step,
+ * "channels": (array of strings) channels used in step,
+ * "messages": {
+ * "message_variation_id": (string) { // <=This is the actual id
+ * "channel": (string) channel type of the message (eg., "email"),
+ * ... channel-specific fields for this message, see Campaign Details Endpoint API Response for example message responses ...
+ * }
+ * }
+ * },
+ * ... (more steps)
+ * ],
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://desktop.postman.com/?desktopVersion=9.19.0&userId=16580579&teamId=409325).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $canvas_id (Required) String
+ *
+ * See [Canvas API Identifier](https://www.braze.com/docs/api/identifier_types/)
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCanvasDetailBadRequestException
+ * @throws \Braze\Exception\GetCanvasDetailUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasDetailForbiddenException
+ * @throws \Braze\Exception\GetCanvasDetailNotFoundException
+ * @throws \Braze\Exception\GetCanvasDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasDetailInternalServerErrorException
+ */
+ public function getCanvasDetail(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCanvasDetail($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export a list of Canvases, including the name, Canvas API identifier and associated tags.
+ *
+ * Canvases are returned in groups of 100 sorted by time of creation (oldest to newest by default).
+ *
+ * Archived Canvases will not be included in the API response unless the `include_archived` field is specified. Canvases that are stopped but not archived, however, will be returned by default.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.list` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "canvases" : [
+ * {
+ * "id" : (string) Canvas API Identifier,
+ * "last_edited": (ISO 8601 string) the last edited time for the message,
+ * "name" : (string) Canvas name,
+ * "tags" : (array) tag names associated with the Canvas,
+ * },
+ * ... (more Canvases)
+ * ],
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://desktop.postman.com/?desktopVersion=9.19.0&userId=16580579&teamId=409325).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of Canvases to return, defaults to `0` (returns the first set of up to 100)
+ * @var bool $include_archived (Optional) Boolean
+ *
+ * Whether or not to include archived Canvases, defaults to `false`
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * @var string $last_edit.time[gt] (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Filters the results and only returns Canvases that were edited greater than the time provided till now. Format is `yyyy-MM-DDTHH:mm:ss`.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetCanvasListBadRequestException
+ * @throws \Braze\Exception\GetCanvasListUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasListForbiddenException
+ * @throws \Braze\Exception\GetCanvasListNotFoundException
+ * @throws \Braze\Exception\GetCanvasListTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasListInternalServerErrorException
+ */
+ public function getCanvasList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetCanvasList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export a list of custom events that have been recorded for your app. The event names are returned in groups of 250, sorted alphabetically.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `events.list` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/purchases/product_list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "events" : [
+ * "Event A", (string) the event name,
+ * "Event B", (string) the event name,
+ * "Event C", (string) the event name,
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ### Fatal error response codes
+ *
+ * For status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/docs/api/errors/#fatal-errors).
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of event names to return, defaults to 0 (returns the first set of up to 250).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetEventsListBadRequestException
+ * @throws \Braze\Exception\GetEventsListUnauthorizedException
+ * @throws \Braze\Exception\GetEventsListForbiddenException
+ * @throws \Braze\Exception\GetEventsListNotFoundException
+ * @throws \Braze\Exception\GetEventsListTooManyRequestsException
+ * @throws \Braze\Exception\GetEventsListInternalServerErrorException
+ */
+ public function getEventsList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetEventsList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a series of the number of occurrences of a custom event in your app over a designated time period.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `app_id` can be found at**Developer Console** > **API Settings**
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `events.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
+ * "count" : (int)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ### Fatal error response codes
+ *
+ * For status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/docs/api/errors/#fatal-errors).
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $event (Required) String
+ *
+ * The name of the custom event for which to return analytics
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of units (days or hours) before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $unit (Optional) String
+ *
+ * Unit of time between data points - can be `day` or `hour`, defaults to `day`
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys** to limit analytics to a specific app
+ * @var string $segment_id (Optional) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/). Segment ID indicating the analytics-enabled segment for which event analytics should be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetEventsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetEventsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetEventsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetEventsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetEventsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetEventsDataSeriesInternalServerErrorException
+ */
+ public function getEventsDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetEventsDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of the total number of new users on each date.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `app_id` can be found at **Developer Console** > **API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.new_users.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "new_users" : (int) the number of daily new users
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesInternalServerErrorException
+ */
+ public function getKpiNewUsersDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetKpiNewUsersDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of the total number of unique active users on each date.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), API Keys can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.dau.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "dau" : (int) the number of daily active users
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetKpiDauDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesInternalServerErrorException
+ */
+ public function getKpiDauDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetKpiDauDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of the total number of unique active users over a 30-day rolling window.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), API Keys can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.mau.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "mau" : (int) the number of monthly active users
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetKpiMauDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesInternalServerErrorException
+ */
+ public function getKpiMauDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetKpiMauDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of the total number of uninstalls on each date.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), API Keys can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.uninstalls.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "uninstalls" : (int) the number of uninstalls
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesInternalServerErrorException
+ */
+ public function getKpiUninstallsDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetKpiUninstallsDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of engagement stats for a card over time.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), \`card_id\` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `feed.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
+ * "clicks" : (int) the number of clicks,
+ * "impressions" : (int) the number of impressions,
+ * "unique_clicks" : (int) the number of unique clicks,
+ * "unique_impressions" : (int) the number of unique impressions
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $card_id (Required) String
+ *
+ * See [Card API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `card_id` for a given card can be found in the **Settings > Setup and Testing > API Keys** page and on the card details page within your dashboard, or you can use the [News Feed List Endpoint](https://www.braze.com/docs/api/endpoints/export/news_feed/get_news_feed_cards/).
+ * @var int $length (Required) Integer
+ *
+ * Max number of units (days or hours) before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $unit (Optional) String
+ *
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ *
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetFeedDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetFeedDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetFeedDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetFeedDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetFeedDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetFeedDataSeriesInternalServerErrorException
+ */
+ public function getFeedDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetFeedDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve relevant information on a card, which can be identified by the `card_id`.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `card_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `feed.details` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) The status of the export, returns 'success' when completed without errors,
+ * "created_at" : (string) Date created as ISO 8601 date,
+ * "updated_at" : (string) Date last updated as ISO 8601 date,
+ * "name" : (string) Card name,
+ * "publish_at" : (string) Date card was published as ISO 8601 date,
+ * "end_at" : (string) Date card will stop displaying for users as ISO 8601 date,
+ * "tags" : (array) Tag names associated with the card,
+ * "title" : (string) Title of the card,
+ * "image_url" : (string) Image URL used by this card,
+ * "extras" : (dictionary) Dictionary containing key-value pair data attached to this card,
+ * "description" : (string) Description text used by this card,
+ * "archived": (boolean) whether this Card is archived,
+ * "draft": (boolean) whether this Card is a draft,
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $card_id (Required) String
+ *
+ * See [Card API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `card_id` for a given card can be found in the **Settings > Setup and Testing > API Keys** page and on the card details page within your dashboard, or you can use the [News Feed List Endpoint](https://www.braze.com/docs/api/endpoints/export/news_feed/get_news_feed_cards/).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetFeedDetailBadRequestException
+ * @throws \Braze\Exception\GetFeedDetailUnauthorizedException
+ * @throws \Braze\Exception\GetFeedDetailForbiddenException
+ * @throws \Braze\Exception\GetFeedDetailNotFoundException
+ * @throws \Braze\Exception\GetFeedDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetFeedDetailInternalServerErrorException
+ */
+ public function getFeedDetail(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetFeedDetail($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export a list of News Feed cards, each of which will include its name and card API identifier.
+ *
+ * The cards are returned in groups of 100 sorted by time of creation (oldest to newest by default).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `feed.list` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "cards" : [
+ * {
+ * "id" : (string) Card API Identifier,
+ * "type" : (string) type of the card - NewsItem (classic cards), CaptionedImage, Banner or DevPick (cross-promotional cards),
+ * "title" : (string) title of the card,
+ * "tags" : (array) tag names associated with the card
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of cards to return, defaults to 0 (returns the first set of up to 100)
+ * @var bool $include_archived (Optional) Boolean
+ *
+ * Whether or not to include archived cards, defaults to false
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetFeedListBadRequestException
+ * @throws \Braze\Exception\GetFeedListUnauthorizedException
+ * @throws \Braze\Exception\GetFeedListForbiddenException
+ * @throws \Braze\Exception\GetFeedListNotFoundException
+ * @throws \Braze\Exception\GetFeedListTooManyRequestsException
+ * @throws \Braze\Exception\GetFeedListInternalServerErrorException
+ */
+ public function getFeedList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetFeedList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return a paginated lists of product IDs.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `purchases.product_list` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/events/list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "products": [
+ * "product_name" (string), the name of the product
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of your product list that you would like to view.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetPurchasesProductListBadRequestException
+ * @throws \Braze\Exception\GetPurchasesProductListUnauthorizedException
+ * @throws \Braze\Exception\GetPurchasesProductListForbiddenException
+ * @throws \Braze\Exception\GetPurchasesProductListNotFoundException
+ * @throws \Braze\Exception\GetPurchasesProductListTooManyRequestsException
+ * @throws \Braze\Exception\GetPurchasesProductListInternalServerErrorException
+ */
+ public function getPurchasesProductList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetPurchasesProductList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return the total number of purchases in your app over a time range.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `purchases.quantity_series` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/events/list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/purchases/quantity_series?length=100' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "purchase_quantity" : (int) the number of items purchased in the time period
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $ending_at (Optional) Datetime (ISO 8601 string)
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var int $length (Required) Integer
+ * Maximum number of days before ending_at to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var int $unit (Optional) String
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $app_id (Optional) String
+ * App API identifier retrieved from the Settings > Setup and Testing > API Keys to limit analytics to a specific app
+ * @var string $product (Optional) String
+ * Name of product to filter response by. If excluded, results for all apps will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesBadRequestException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesUnauthorizedException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesForbiddenException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesNotFoundException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesInternalServerErrorException
+ */
+ public function getPurchasesQuantitySeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetPurchasesQuantitySeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return the total money spent in your app over a time range.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `purchases.revenue_series` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/events/list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/purchases/revenue_series?length=100' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "revenue" : (int) amount of revenue for the time period
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $ending_at (Optional) Datetime (ISO 8601 string)
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var int $length (Required) Integer
+ * Maximum number of days before ending_at to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var int $unit (Optional) String
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $app_id (Optional) String
+ * App API identifier retrieved from the Settings > Setup and Testing > API Keys to limit analytics to a specific app
+ * @var string $product (Optional) String
+ * Name of product to filter response by. If excluded, results for all apps will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesBadRequestException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesForbiddenException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesNotFoundException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesInternalServerErrorException
+ */
+ public function getPurchasesRevenueSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetPurchasesRevenueSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export a list of segments, each of which will include its name, Segment API identifier, and whether it has analytics tracking enabled.
+ *
+ * The segments are returned in groups of 100 sorted by time of creation (oldest to newest by default). Archived segments are not included.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `segments.list` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "segments" : [
+ * {
+ * "id" : (string) Segment API Identifier,
+ * "name" : (string) segment name,
+ * "analytics_tracking_enabled" : (boolean) whether the segment has analytics tracking enabled,
+ * "tags" : (array) tag names associated with the segment
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of segments to return, defaults to 0 (returns the first set of up to 100)
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSegmentsListBadRequestException
+ * @throws \Braze\Exception\GetSegmentsListUnauthorizedException
+ * @throws \Braze\Exception\GetSegmentsListForbiddenException
+ * @throws \Braze\Exception\GetSegmentsListNotFoundException
+ * @throws \Braze\Exception\GetSegmentsListTooManyRequestsException
+ * @throws \Braze\Exception\GetSegmentsListInternalServerErrorException
+ */
+ public function getSegmentsList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSegmentsList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a daily series of the estimated size of a segment over time.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `segments.data_series` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) date as ISO 8601 date,
+ * "size" : (int) size of the segment on that date
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $segment_id (Required) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `segment_id` for a given segment can be found in your **Settings > Setup and Testing > API Keys.** within your Braze account or you can use the [Segment List Endpoint](https://www.braze.com/docs/api/endpoints/export/get_segment/).
+ * @var int $length (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series - must be between 1 and 100 (inclusive)
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSegmentsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesInternalServerErrorException
+ */
+ public function getSegmentsDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSegmentsDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve relevant information on a segment, which can be identified by the `segment_id`.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `segments.details` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "created_at" : (string) date created as ISO 8601 date,
+ * "updated_at" : (string) date last updated as ISO 8601 date,
+ * "name" : (string) segment name,
+ * "description" : (string) human-readable description of filters,
+ * "text_description" : (string) segment description,
+ * "tags" : (array) tag names associated with the segment
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $segment_id (Required) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `segment_id` for a given segment can be found in your **Settings > Setup and Testing > API Keys** within your Braze account or you can use the [Segment List Endpoint](https://www.braze.com/docs/api/endpoints/export/get_segment/).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSegmentsDetailBadRequestException
+ * @throws \Braze\Exception\GetSegmentsDetailUnauthorizedException
+ * @throws \Braze\Exception\GetSegmentsDetailForbiddenException
+ * @throws \Braze\Exception\GetSegmentsDetailNotFoundException
+ * @throws \Braze\Exception\GetSegmentsDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetSegmentsDetailInternalServerErrorException
+ */
+ public function getSegmentsDetail(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSegmentsDetail($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to retrieve a series of the number of sessions for your app over a designated time period.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sessions.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
+ * "sessions" : (int)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series - must be between 1 and 100 (inclusive)
+ * @var string $unit (Optional) String
+ *
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $ending_at (Optional) Datetime (ISO 8601 string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from the **Settings > Setup and Testing > API Keys** to limit analytics to a specific app
+ * @var string $segment_id (Required) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/). Segment ID indicating the analytics-enabled segment for which sessions should be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSessionsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetSessionsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetSessionsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetSessionsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetSessionsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetSessionsDataSeriesInternalServerErrorException
+ */
+ public function getSessionsDataSeries(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSessionsDataSeries($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export data from any user profile by specifying a user identifier.
+ *
+ * Up to 50 `external_ids` or `user_aliases` can be included in a single request. Should you want to specify `device_id` or `email_address` only one of either identifier can be included per request.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.export.ids` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after August 16, 2021, we apply a rate limit of 2,500 requests per minute to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_ids` | Optional | Array of strings | External identifiers for users you wish export. |
+ * | `user_aliases` | Optional | Array of user alias object | [User aliases](https://www.braze.com/docs/api/objects_filters/user_alias_object/) for users to export. |
+ * | `device_id` | Optional | String | Device identifier, as returned by various SDK methods such as `getDeviceId`. |
+ * | `braze_id` | Optional | String | Braze identifier for a particular user. |
+ * | `email_address` | Optional | String | Email address of user. |
+ * | `phone` | Optional | String in [E.164](https://en.wikipedia.org/wiki/E.164) format | Phone number of user. |
+ * | `fields_to_export` | Optional | Array of strings | Name of user data fields to export. Defaults to all if not provided. |
+ *
+ * ## Fields to export
+ *
+ * The following is a list of valid `fields_to_export`. Using `fields_to_export` to minimize the data returned can improve response time of this API endpoint:
+ *
+ * | Field to export | Data type | Description |
+ * | --- | --- | --- |
+ * | `apps` | Array | Apps this user has logged sessions for, which includes the fields:
\- `name`: app name
\- `platform`: app platform, such as iOS, Android, or Web
\- `version`: app version number or name
\- `sessions`: total number of sessions for this app
\- `first_used`: date of first session
\- `last_used`: date of last session
All fields are strings. |
+ * | `attributed_campaign` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for a particular ad campaign. |
+ * | `attributed_source` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for the platform the ad was on. |
+ * | `attributed_adgroup` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign. |
+ * | `attributed_ad` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign and adgroup. |
+ * | `braze_id` | String | Device-specific unique user identifier set by Braze for this user. |
+ * | `country` | String | User's country using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. |
+ * | `created_at` | String | Date and time for when the user profile was created, in ISO 8601 format. |
+ * | `custom_attributes` | Object | Custom attribute key-value pairs for this user. |
+ * | `custom_events` | Array | Custom events attributed to this user in the last 90 days. |
+ * | `devices` | Array | Information about the user's device, which could include the following depending on platform:
\- `model`: Device's model name
\- `os`: Device's operating system
\- `carrier`: Device's service carrier, if available
\- `idfv`: (iOS) Braze's device identifier, the Apple Identifier for Vendor, if exists
\- `idfa`: (iOS) Identifier for Advertising, if exists
\- `device_id`: (Android) Braze's device identifier
\- `google_ad_id`: (Android) Google Play Advertising Identifier, if exists
\- `roku_ad_id`: (Roku) Roku Advertising Identifier
\- `ad_tracking_enabled`: If ad tracking is enabled on the device, can be true or false |
+ * | `dob` | String | User's date of birth in the format `YYYY-MM-DD`. |
+ * | `email` | String | User's email address. |
+ * | `external_id` | String | Unique user identifier for identified users. |
+ * | `first_name` | String | User's first name. |
+ * | `gender` | String | User's gender. Possible values are:
\- `M`: male
\- `F`: female
\- `O`: other
\- `N`: not applicable
\- `P`: prefer not to say
\- `nil`: unknown |
+ * | `home_city` | String | User's home city. |
+ * | `language` | String | User's language in ISO-639-1 standard. |
+ * | `last_coordinates` | Array of floats | User's most recent device location, formatted as `[longitude, latitude]`. |
+ * | `last_name` | String | User's last name. |
+ * | `phone` | String | User's telephone number in E.164 format. |
+ * | `purchase`s | Array | Purchases this user has made in the last 90 days. |
+ * | `random_bucket` | Integer | User's [random bucket number](https:/www.braze.com/docs/user_guide/data_and_analytics/braze_currents/event_glossary/customer_behavior_events#random-bucket-number-event), used to create uniformly distributed segments of random users. |
+ * | `time_zone` | String | User's time zone in the same format as the IANA Time Zone Database. |
+ * | `total_revenue` | Float | Total revenue attributed to this user. Total revenue is calculated based on purchases the user made during conversion windows for the campaigns and Canvases they received. |
+ * | `uninstalled_at` | Timestamp | Date and time the user uninstalls the app. Omitted if the app has not been uninstalled. |
+ * | `user_aliases` | Object | [User aliases object](https:/www.braze.com/docs/api/objects_filters/user_alias_object#user-alias-object-specification) containing the `alias_name` and `alias_label`, if exists. |
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "users" : (array of object) the data for each of the exported users, may be empty if no users are found,
+ * "invalid_user_ids" : (optional, array of string) each of the identifiers provided in the request that did not correspond to a known user
+ * }
+ *
+ * ```
+ *
+ * For an example of the data that is accessible via this endpoint see the following example.
+ *
+ * ### Sample user export file output
+ *
+ * User export object (we will include the least data possible - if a field is missing from the object it should be assumed to be null, false, or empty):
+ *
+ * ``` json
+ * {
+ * "external_id" : (string),
+ * "user_aliases" : [
+ * {
+ * "alias_name" : (string),
+ * "alias_label" : (string)
+ * }
+ * ],
+ * "braze_id": (string),
+ * "first_name" : (string),
+ * "last_name" : (string),
+ * "email" : (string),
+ * "dob" : (string) date for the user's date of birth,
+ * "home_city" : (string),
+ * "country" : (string),
+ * "phone" : (string),
+ * "language" : (string) ISO-639 two letter code,
+ * "time_zone" : (string),
+ * "last_coordinates" : (array of float) [lon, lat],
+ * "gender" : (string) "M" | "F",
+ * "total_revenue" : (float),
+ * "attributed_campaign" : (string),
+ * "attributed_source" : (string),
+ * "attributed_adgroup" : (string),
+ * "attributed_ad" : (string),
+ * "push_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "email_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "custom_attributes" : (object) custom attribute key-value pairs,
+ * "custom_events" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "purchases" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "devices" : [
+ * {
+ * "model" : (string),
+ * "os" : (string),
+ * "carrier" : (string),
+ * "idfv" : (string) only included for iOS devices,
+ * "idfa" : (string) only included for iOS devices when IDFA collection is enabled,
+ * "google_ad_id" : (string) only included for Android devices when Google Play Advertising Identifier collection is enabled,
+ * "roku_ad_id" : (string) only included for Roku devices,
+ * "windows_ad_id" : (string) only included for Windows devices,
+ * "ad_tracking_enabled" : (bool)
+ * },
+ * ...
+ * ],
+ * "push_tokens" : [
+ * {
+ * "app" : (string) app name,
+ * "platform" : (string),
+ * "token" : (string)
+ * },
+ * ...
+ * ],
+ * "apps" : [
+ * {
+ * "name" : (string),
+ * "platform" : (string),
+ * "version" : (string),
+ * "sessions" : (integer),
+ * "first_used" : (string) date,
+ * "last_used" : (string) date
+ * },
+ * ...
+ * ],
+ * "campaigns_received" : [
+ * {
+ * "name" : (string),
+ * "last_received" : (string) date,
+ * "engaged" : {
+ * "opened_email" : (bool),
+ * "opened_push" : (bool),
+ * "clicked_email" : (bool),
+ * "clicked_triggered_in_app_message" : (bool)
+ * },
+ * "converted" : (bool),
+ * "api_campaign_id" : (string),
+ * "variation_name" : (optional, string) exists only if it is a multivariate campaign,
+ * "variation_api_id" : (optional, string) exists only if it is a multivariate campaign,
+ * "in_control" : (optional, bool) exists only if it is a multivariate campaign
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_id": (string),
+ * "last_received_message": (string) date,
+ * "last_entered": (string) date,
+ * "variation_name": (string),
+ * "in_control": (bool),
+ * "last_exited": (string) date,
+ * "steps_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * }
+ * ]
+ * },
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : (string)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * #### Sample output
+ *
+ * ``` json
+ * {
+ * "created_at" : "2020-07-10 15:00:00.000 UTC",
+ * "external_id" : "A8i3mkd99",
+ * "user_aliases" : [
+ * {
+ * "alias_name" : "user_123",
+ * "alias_label" : "amplitude_id"
+ * }
+ * ],
+ * "braze_id": "5fbd99bac125ca40511f2cb1",
+ * "random_bucket" : 2365,
+ * "first_name" : "Jane",
+ * "last_name" : "Doe",
+ * "email" : "example@braze.com",
+ * "dob" : "1980-12-21",
+ * "home_city" : "Chicago",
+ * "country" : "US",
+ * "phone" : "+442071838750",
+ * "language" : "en",
+ * "time_zone" : "Eastern Time (US & Canada)",
+ * "last_coordinates" : [41.84157636433568, -87.83520818508256],
+ * "gender" : "F",
+ * "total_revenue" : 65,
+ * "attributed_campaign" : "braze_test_campaign_072219",
+ * "attributed_source" : "braze_test_source_072219",
+ * "attributed_adgroup" : "braze_test_adgroup_072219",
+ * "attributed_ad" : "braze_test_ad_072219",
+ * "push_subscribe" : "opted_in",
+ * "push_opted_in_at": "2020-01-26T22:45:53.953Z",
+ * "email_subscribe" : "subscribed",
+ * "custom_attributes":
+ * {
+ * "loyaltyId": "37c98b9d-9a7f-4b2f-a125-d873c5152856",
+ * "loyaltyPoints": "321",
+ * "loyaltyPointsNumber": 107
+ * },
+ * "custom_events": [
+ * {
+ * "name": "Loyalty Acknowledgement",
+ * "first": "2021-06-28T17:02:43.032Z",
+ * "last": "2021-06-28T17:02:43.032Z",
+ * "count": 1
+ * },
+ * ...
+ * ],
+ * "purchases": [
+ * {
+ * "name": "item_40834",
+ * "first": "2021-09-05T03:45:50.540Z",
+ * "last": "2022-06-03T17:30:41.201Z",
+ * "count": 10
+ * },
+ * ...
+ * ],
+ * "devices": [
+ * {
+ * "model": "Pixel XL",
+ * "os": "Android (Q)",
+ * "carrier": null,
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "ad_tracking_enabled": true
+ * },
+ * ...
+ * ],
+ * "push_tokens": [
+ * {
+ * "app": "MovieCanon",
+ * "platform": "Android",
+ * "token": "12345abcd",
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "notifications_enabled": true
+ * },
+ * ...
+ * ],
+ * "apps": [
+ * {
+ * "name": "MovieCannon",
+ * "platform": "Android",
+ * "version": "3.29.0",
+ * "sessions": 1129,
+ * "first_used": "2020-02-02T19:56:19.142Z",
+ * "last_used": "2021-11-11T00:25:19.201Z"
+ * },
+ * ...
+ * ],
+ * "campaigns_received": [
+ * {
+ * "name": "Email Unsubscribe",
+ * "api_campaign_id": "d72fdc84-ddda-44f1-a0d5-0e79f47ef942",
+ * "last_received": "2022-06-02T03:07:38.105Z",
+ * "engaged":
+ * {
+ * "opened_email": true
+ * },
+ * "converted": true,
+ * "multiple_converted":
+ * {
+ * "Primary Conversion Event - A": true
+ * },
+ * "in_control": false,
+ * "variation_name": "Variant 1",
+ * "variation_api_id": "1bddc73a-a134-4784-9134-5b5574a9e0b8"
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": "Non Global Holdout Group 4/21/21",
+ * "api_canvas_id": "46972a9d-dc81-473f-aa03-e3473b4ed781",
+ * "last_received_message": "2021-07-07T20:46:24.136Z",
+ * "last_entered": "2021-07-07T20:45:24.000+00:00",
+ * "variation_name": "Variant 1",
+ * "in_control": false,
+ * "last_entered_control_at": null,
+ * "last_exited": "2021-07-07T20:46:24.136Z",
+ * "steps_received": [
+ * {
+ * "name": "Step",
+ * "api_canvas_step_id": "43d1a349-c3c8-4be1-9fbe-ce708e4d1c39",
+ * "last_received": "2021-07-07T20:46:24.136Z"
+ * },
+ * ...
+ * ]
+ * }
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : "Loyalty Promo"
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersExportIdBadRequestException
+ * @throws \Braze\Exception\PostUsersExportIdUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExportIdForbiddenException
+ * @throws \Braze\Exception\PostUsersExportIdNotFoundException
+ * @throws \Braze\Exception\PostUsersExportIdTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExportIdInternalServerErrorException
+ */
+ public function postUsersExportId(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersExportId($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export all the users within a segment.
+ *
+ * User data is exported as multiple files of user JSON objects separated by new lines (i.e., one JSON object per line).
+ *
+ * Data is exported to an automatically generated URL, or to an S3 bucket if this integration is already set up.
+ *
+ * This endpoint is currently not supported by Google Cloud Storage.
+ *
+ * Note that a company may run at most one export per segment using this endpoint at a given time. Wait for your export to complete before retrying.
+ *
+ * > Beginning December 2021, the following changed for this API:
+ *
+ * > 1\. The fields_to_export field in this API request is required. The option to default to all fields has been removed.
+ * 2\. The fields for custom_events, purchases, campaigns_received, and canvases_received only contain data from the last 90 days.
+ *
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.export.segment` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Credential-based response details
+ *
+ * For information regarding credentials-based response details, visit this [section](https://www.braze.com/docs/api/endpoints/export/user_data/post_users_segment/#credentials-based-response-details) in the Braze API docs.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `segment_id` | Required | String | Identifier for the segment to be exported. See [segment identifier](https://www.braze.com/docs/api/identifier_types/).
The segment_id for a given segment can be found in your **Settings > Setup and Testing > API Keys** within your Braze account or you can use the [Segment List Endpoint](https://www.braze.com/docs/api/endpoints/export/segments/get_segment/). |
+ * | `callback_endpoint` | Optional | String | Endpoint to post a download URL to when the export is available. |
+ * | `fields_to_export` | Required\* | Array of strings | Name of user data fields to export, you may also export custom attributes.
\*Beginning April 2021, new accounts must specify specific fields to export. |
+ * | `output_format` | Optional | String | When using your own S3 bucket, allows you to specify file format as `zip` or `gzip`. Defaults to ZIP file format. |
+ *
+ * ### Fields to export
+ *
+ * The following is a list of valid `fields_to_export`. Using `fields_to_export` to minimize the data returned can improve response time of this API endpoint:
+ *
+ * | Field to export | Data type | Description |
+ * | --- | --- | --- |
+ * | `apps` | Array | Apps this user has logged sessions for, which includes the fields:
\- `name`: app name
\- `platform`: app platform, such as iOS, Android, or Web
\- `version`: app version number or name
\- `sessions`: total number of sessions for this app
\- `first_used`: date of first session
\- `last_used`: date of last session
All fields are strings. |
+ * | `attributed_campaign` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for a particular ad campaign. |
+ * | `attributed_source` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for the platform the ad was on. |
+ * | `attributed_adgroup` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign. |
+ * | `attributed_ad` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign and adgroup. |
+ * | `braze_id` | String | Device-specific unique user identifier set by Braze for this user. |
+ * | `country` | String | User's country using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. |
+ * | `created_at` | String | Date and time for when the user profile was created, in ISO 8601 format. |
+ * | `custom_attributes` | Object | Custom attribute key-value pairs for this user. |
+ * | `custom_events` | Array | Custom events attributed to this user in the last 90 days. |
+ * | `devices` | Array | Information about the user's device, which could include the following depending on platform:
\- `model`: Device's model name
\- `os`: Device's operating system
\- `carrier`: Device's service carrier, if available
\- `idfv`: (iOS) Braze's device identifier, the Apple Identifier for Vendor, if exists
\- `idfa`: (iOS) Identifier for Advertising, if exists
\- `device_id`: (Android) Braze's device identifier
\- `google_ad_id`: (Android) Google Play Advertising Identifier, if exists
\- `roku_ad_id`: (Roku) Roku Advertising Identifier
\- `ad_tracking_enabled`: If ad tracking is enabled on the device, can be true or false |
+ * | `dob` | String | User's date of birth in the format `YYYY-MM-DD`. |
+ * | `email` | String | User's email address. |
+ * | `external_id` | String | Unique user identifier for identified users. |
+ * | `first_name` | String | User's first name. |
+ * | `gender` | String | User's gender. Possible values are:
\- `M`: male
\- `F`: female
\- `O`: other
\- `N`: not applicable
\- `P`: prefer not to say
\- `nil`: unknown |
+ * | `home_city` | String | User's home city. |
+ * | `language` | String | User's language in ISO-639-1 standard. |
+ * | `last_coordinates` | Array of floats | User's most recent device location, formatted as `[longitude, latitude]`. |
+ * | `last_name` | String | User's last name. |
+ * | `phone` | String | User's telephone number in E.164 format. |
+ * | `purchase`s | Array | Purchases this user has made in the last 90 days. |
+ * | `random_bucket` | Integer | User's [random bucket number](https:/www.braze.com/docs/user_guide/data_and_analytics/braze_currents/event_glossary/customer_behavior_events#random-bucket-number-event), used to create uniformly distributed segments of random users. |
+ * | `time_zone` | String | User's time zone in the same format as the IANA Time Zone Database. |
+ * | `total_revenue` | Float | Total revenue attributed to this user. Total revenue is calculated based on purchases the user made during conversion windows for the campaigns and Canvases they received. |
+ * | `uninstalled_at` | Timestamp | Date and time the user uninstalls the app. Omitted if the app has not been uninstalled. |
+ * | `user_aliases` | Object | [User aliases object](https:/www.braze.com/docs/api/objects_filters/user_alias_object#user-alias-object-specification) containing the `alias_name` and `alias_label`, if exists. |
+ *
+ * ### Important reminders
+ *
+ * - The fields for `custom_events`, `purchases`, `campaigns_received`, and `canvases_received` will contain only contain data from the last 90 days.
+ * - Both `custom_events` and `purchases` contain fields for `first` and `count`. Both of these fields will reflect information from all time, and will not be limited to just data from the last 90 days. For example, if a particular user first did the event prior to 90 days ago, this will be accurately reflected in the `first` field, and the `count` field will take into account events that occurred prior to the last 90 days as well.
+ * - The number of concurrent segment exports a company can run at the endpoint level is capped at 100. Attempts that surpass this limit will result in an error.
+ *
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "object_prefix": (required, string) the filename prefix that will be used for the JSON file produced by this export, e.g. 'bb8e2a91-c4aa-478b-b3f2-a4ee91731ad1-1464728599',
+ * "url" : (optional, string) the URL where the segment export data can be downloaded if you do not have your own S3 credentials
+ * }
+ *
+ * ```
+ *
+ * Once made available, the URL will only be valid for a few hours. As such, we highly recommend that you add your own S3 credentials to Braze.
+ *
+ * ### Sample user export file output
+ *
+ * User export object (we will include the least data possible - if a field is missing from the object it should be assumed to be null, false, or empty):
+ *
+ * ``` json
+ * {
+ * "external_id" : (string),
+ * "user_aliases" : [
+ * {
+ * "alias_name" : (string),
+ * "alias_label" : (string)
+ * }
+ * ],
+ * "braze_id": (string),
+ * "first_name" : (string),
+ * "last_name" : (string),
+ * "email" : (string),
+ * "dob" : (string) date for the user's date of birth,
+ * "home_city" : (string),
+ * "country" : (string),
+ * "phone" : (string),
+ * "language" : (string) ISO-639 two letter code,
+ * "time_zone" : (string),
+ * "last_coordinates" : (array of float) [lon, lat],
+ * "gender" : (string) "M" | "F",
+ * "total_revenue" : (float),
+ * "attributed_campaign" : (string),
+ * "attributed_source" : (string),
+ * "attributed_adgroup" : (string),
+ * "attributed_ad" : (string),
+ * "push_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "email_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "custom_attributes" : (object) custom attribute key value pairs,
+ * "custom_events" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "purchases" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "devices" : [
+ * {
+ * "model" : (string),
+ * "os" : (string),
+ * "carrier" : (string),
+ * "idfv" : (string) only included for iOS devices,
+ * "idfa" : (string) only included for iOS devices when IDFA collection is enabled,
+ * "google_ad_id" : (string) only included for Android devices when Google Play Advertising Identifier collection is enabled,
+ * "roku_ad_id" : (string) only included for Roku devices,
+ * "windows_ad_id" : (string) only included for Windows devices,
+ * "ad_tracking_enabled" : (bool)
+ * },
+ * ...
+ * ],
+ * "push_tokens" : [
+ * {
+ * "app" : (string) app name,
+ * "platform" : (string),
+ * "token" : (string)
+ * },
+ * ...
+ * ],
+ * "apps" : [
+ * {
+ * "name" : (string),
+ * "platform" : (string),
+ * "version" : (string),
+ * "sessions" : (string),
+ * "first_used" : (string) date,
+ * "last_used" : (string) date
+ * },
+ * ...
+ * ],
+ * "campaigns_received" : [
+ * {
+ * "name" : (string),
+ * "last_received" : (string) date,
+ * "engaged" : {
+ * "opened_email" : (bool),
+ * "opened_push" : (bool),
+ * "clicked_email" : (bool),
+ * "clicked_in_app_message" : (bool)
+ * },
+ * "converted" : (bool),
+ * "api_campaign_id" : (string),
+ * "variation_name" : (optional, string) exists only if it is a multivariate campaign,
+ * "variation_api_id" : (optional, string) exists only if it is a multivariate campaign,
+ * "in_control" : (optional, bool) exists only if it is a multivariate campaign
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_id": (string),
+ * "last_received_message": (string) date,
+ * "last_entered": (string) date,
+ * "variation_name": (string),
+ * "in_control": (bool),
+ * "last_exited": (string) date,
+ * "steps_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * }
+ * ]
+ * },
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : (string)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * Sample output
+ *
+ * ``` json
+ * {
+ * "created_at" : "2020-07-10 15:00:00.000 UTC",
+ * "external_id" : "A8i3mkd99",
+ * "user_aliases" : [
+ * {
+ * "alias_name" : "user_123",
+ * "alias_label" : "amplitude_id"
+ * }
+ * ],
+ * "braze_id": "5fbd99bac125ca40511f2cb1",
+ * "random_bucket" : 2365,
+ * "first_name" : "Jane",
+ * "last_name" : "Doe",
+ * "email" : "example@braze.com",
+ * "dob" : "1980-12-21",
+ * "home_city" : "Chicago",
+ * "country" : "US",
+ * "phone" : "+442071838750",
+ * "language" : "en",
+ * "time_zone" : "Eastern Time (US & Canada)",
+ * "last_coordinates" : [41.84157636433568, -87.83520818508256],
+ * "gender" : "F",
+ * "total_revenue" : 65,
+ * "attributed_campaign" : "braze_test_campaign_072219",
+ * "attributed_source" : "braze_test_source_072219",
+ * "attributed_adgroup" : "braze_test_adgroup_072219",
+ * "attributed_ad" : "braze_test_ad_072219",
+ * "push_subscribe" : "opted_in",
+ * "push_opted_in_at": "2020-01-26T22:45:53.953Z",
+ * "email_subscribe" : "subscribed",
+ * "custom_attributes":
+ * {
+ * "loyaltyId": "37c98b9d-9a7f-4b2f-a125-d873c5152856",
+ * "loyaltyPoints": "321",
+ * "loyaltyPointsNumber": 107
+ * },
+ * "custom_events": [
+ * {
+ * "name": "Loyalty Acknowledgement",
+ * "first": "2021-06-28T17:02:43.032Z",
+ * "last": "2021-06-28T17:02:43.032Z",
+ * "count": 1
+ * },
+ * ...
+ * ],
+ * "purchases": [
+ * {
+ * "name": "item_40834",
+ * "first": "2021-09-05T03:45:50.540Z",
+ * "last": "2022-06-03T17:30:41.201Z",
+ * "count": 10
+ * },
+ * ...
+ * ],
+ * "devices": [
+ * {
+ * "model": "Pixel XL",
+ * "os": "Android (Q)",
+ * "carrier": null,
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "ad_tracking_enabled": true
+ * },
+ * ...
+ * ],
+ * "push_tokens": [
+ * {
+ * "app": "MovieCanon",
+ * "platform": "Android",
+ * "token": "12345abcd",
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "notifications_enabled": true
+ * },
+ * ...
+ * ],
+ * "apps": [
+ * {
+ * "name": "MovieCannon",
+ * "platform": "Android",
+ * "version": "3.29.0",
+ * "sessions": 1129,
+ * "first_used": "2020-02-02T19:56:19.142Z",
+ * "last_used": "2021-11-11T00:25:19.201Z"
+ * },
+ * ...
+ * ],
+ * "campaigns_received": [
+ * {
+ * "name": "Email Unsubscribe",
+ * "api_campaign_id": "d72fdc84-ddda-44f1-a0d5-0e79f47ef942",
+ * "last_received": "2022-06-02T03:07:38.105Z",
+ * "engaged":
+ * {
+ * "opened_email": true
+ * },
+ * "converted": true,
+ * "multiple_converted":
+ * {
+ * "Primary Conversion Event - A": true
+ * },
+ * "in_control": false,
+ * "variation_name": "Variant 1",
+ * "variation_api_id": "1bddc73a-a134-4784-9134-5b5574a9e0b8"
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": "Non Global Holdout Group 4/21/21",
+ * "api_canvas_id": "46972a9d-dc81-473f-aa03-e3473b4ed781",
+ * "last_received_message": "2021-07-07T20:46:24.136Z",
+ * "last_entered": "2021-07-07T20:45:24.000+00:00",
+ * "variation_name": "Variant 1",
+ * "in_control": false,
+ * "last_entered_control_at": null,
+ * "last_exited": "2021-07-07T20:46:24.136Z",
+ * "steps_received": [
+ * {
+ * "name": "Step",
+ * "api_canvas_step_id": "43d1a349-c3c8-4be1-9fbe-ce708e4d1c39",
+ * "last_received": "2021-07-07T20:46:24.136Z"
+ * },
+ * ...
+ * ]
+ * }
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : "Loyalty Promo"
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > Tip: For help with CSV and API exports, visit Export troubleshooting.
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersExportSegmentBadRequestException
+ * @throws \Braze\Exception\PostUsersExportSegmentUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExportSegmentForbiddenException
+ * @throws \Braze\Exception\PostUsersExportSegmentNotFoundException
+ * @throws \Braze\Exception\PostUsersExportSegmentTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExportSegmentInternalServerErrorException
+ */
+ public function postUsersExportSegment(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersExportSegment($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to export all users within a Global Control Group.
+ *
+ * User data is exported as multiple files of user JSON objects separated by new lines (i.e., one JSON object per line).
+ *
+ * > Warning: Individual custom attributes cannot be exported. However, all custom attributes can be exported by including custom_attributes in the fields_to_export array (e.g.,\[‘first_name’, ‘email’, ‘custom_attributes’\]).
+ *
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.export.global_control_group` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](http://localhost:4000/docs/api/api_limits/).
+ *
+ * ## Credential-based response details
+ *
+ * For information regarding credentials-based response details, visit this [section](https://www.braze.com/docs/api/endpoints/export/user_data/post_users_global_control_group/#credentials-based-response-details) in the Braze API docs.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `callback_endpoint` | Optional | String | Endpoint to post a download URL to when the export is available. |
+ * | `fields_to_export` | Required\* | Array of strings | Name of user data fields to export, you may also export custom attributes.
\*Beginning April 2021, new accounts must specify specific fields to export. |
+ * | `output_format` | Optional | String | When using your own S3 bucket, allows to specify file format as `zip` or `gzip`. Defaults to ZIP file format. |
+ *
+ * ## Fields to export
+ *
+ * The following is a list of valid `fields_to_export`. Using `fields_to_export` to minimize the data returned can improve response time of this API endpoint:
+ *
+ * | Field to export | Data type | Description |
+ * | --- | --- | --- |
+ * | `apps` | Array | Apps this user has logged sessions for, which includes the fields:
\- `name`: app name
\- `platform`: app platform, such as iOS, Android, or Web
\- `version`: app version number or name
\- `sessions`: total number of sessions for this app
\- `first_used`: date of first session
\- `last_used`: date of last session
All fields are strings. |
+ * | `attributed_campaign` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for a particular ad campaign. |
+ * | `attributed_source` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for the platform the ad was on. |
+ * | `attributed_adgroup` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign. |
+ * | `attributed_ad` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign and adgroup. |
+ * | `braze_id` | String | Device-specific unique user identifier set by Braze for this user. |
+ * | `country` | String | User's country using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. |
+ * | `created_at` | String | Date and time for when the user profile was created, in ISO 8601 format. |
+ * | `custom_attributes` | Object | Custom attribute key-value pairs for this user. |
+ * | `custom_events` | Array | Custom events attributed to this user in the last 90 days. |
+ * | `devices` | Array | Information about the user's device, which could include the following depending on platform:
\- `model`: Device's model name
\- `os`: Device's operating system
\- `carrier`: Device's service carrier, if available
\- `idfv`: (iOS) Braze's device identifier, the Apple Identifier for Vendor, if exists
\- `idfa`: (iOS) Identifier for Advertising, if exists
\- `device_id`: (Android) Braze's device identifier
\- `google_ad_id`: (Android) Google Play Advertising Identifier, if exists
\- `roku_ad_id`: (Roku) Roku Advertising Identifier
\- `ad_tracking_enabled`: If ad tracking is enabled on the device, can be true or false |
+ * | `dob` | String | User's date of birth in the format `YYYY-MM-DD`. |
+ * | `email` | String | User's email address. |
+ * | `external_id` | String | Unique user identifier for identified users. |
+ * | `first_name` | String | User's first name. |
+ * | `gender` | String | User's gender. Possible values are:
\- `M`: male
\- `F`: female
\- `O`: other
\- `N`: not applicable
\- `P`: prefer not to say
\- `nil`: unknown |
+ * | `home_city` | String | User's home city. |
+ * | `language` | String | User's language in ISO-639-1 standard. |
+ * | `last_coordinates` | Array of floats | User's most recent device location, formatted as `[longitude, latitude]`. |
+ * | `last_name` | String | User's last name. |
+ * | `phone` | String | User's telephone number in E.164 format. |
+ * | `purchase`s | Array | Purchases this user has made in the last 90 days. |
+ * | `random_bucket` | Integer | User's [random bucket number](https:/www.braze.com/docs/user_guide/data_and_analytics/braze_currents/event_glossary/customer_behavior_events#random-bucket-number-event), used to create uniformly distributed segments of random users. |
+ * | `time_zone` | String | User's time zone in the same format as the IANA Time Zone Database. |
+ * | `total_revenue` | Float | Total revenue attributed to this user. Total revenue is calculated based on purchases the user made during conversion windows for the campaigns and Canvases they received. |
+ * | `uninstalled_at` | Timestamp | Date and time the user uninstalls the app. Omitted if the app has not been uninstalled. |
+ * | `user_aliases` | Object | [User aliases object](https:/www.braze.com/docs/api/objects_filters/user_alias_object#user-alias-object-specification) containing the `alias_name` and `alias_label`, if exists. |
+ *
+ * ## Response
+ *
+ * ```
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "object_prefix": (required, string) the filename prefix that will be used for the JSON file produced by this export, e.g.,'bb8e2a91-c4aa-478b-b3f2-a4ee91731ad1-1464728599',
+ * "url" : (optional, string) the URL where the segment export data can be downloaded if you do not have your own S3 credentials
+ * }
+ *
+ * ```
+ *
+ * Once made available, the URL will only be valid for a few hours. As such, we highly recommend that you add your own S3 credentials to Braze.
+ *
+ * ### Sample user export file output
+ *
+ * User export object (we will include the least data possible - if a field is missing from the object it should be assumed to be null, false, or empty):
+ *
+ * ```
+ * {
+ * "external_id" : (string),
+ * "user_aliases" : [
+ * {
+ * "alias_name" : (string),
+ * "alias_label" : (string)
+ * }
+ * ],
+ * "braze_id": (string),
+ * "first_name" : (string),
+ * "last_name" : (string),
+ * "email" : (string),
+ * "dob" : (string) date for the user's date of birth,
+ * "home_city" : (string),
+ * "country" : (string),
+ * "phone" : (string),
+ * "language" : (string) ISO-639 two letter code,
+ * "time_zone" : (string),
+ * "last_coordinates" : (array of float) [lon, lat],
+ * "gender" : (string) "M" | "F",
+ * "total_revenue" : (float),
+ * "attributed_campaign" : (string),
+ * "attributed_source" : (string),
+ * "attributed_adgroup" : (string),
+ * "attributed_ad" : (string),
+ * "custom_attributes" : (object) custom attribute key-value pairs,
+ * "custom_events" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "purchases" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "devices" : [
+ * {
+ * "model" : (string),
+ * "os" : (string),
+ * "carrier" : (string),
+ * "idfv" : (string) only included for iOS devices,
+ * "idfa" : (string) only included for iOS devices when IDFA collection is enabled,
+ * "google_ad_id" : (string) only included for Android devices when Google Play Advertising Identifier collection is enabled,
+ * "roku_ad_id" : (string) only included for Roku devices,
+ * "windows_ad_id" : (string) only included for Windows devices,
+ * "ad_tracking_enabled" : (bool)
+ * },
+ * ...
+ * ],
+ * "apps" : [
+ * {
+ * "name" : (string),
+ * "platform" : (string),
+ * "version" : (string),
+ * "sessions" : (string),
+ * "first_used" : (string) date,
+ * "last_used" : (string) date
+ * },
+ * ...
+ * ],
+ * }
+ *
+ * ```
+ *
+ * ### Sample output
+ *
+ * ``` json
+ * {
+ * "created_at" : "2020-07-10 15:00:00.000 UTC",
+ * "external_id" : "A8i3mkd99",
+ * "user_aliases" : [
+ * {
+ * "alias_name" : "user_123",
+ * "alias_label" : "amplitude_id"
+ * }
+ * ],
+ * "braze_id": "5fbd99bac125ca40511f2cb1",
+ * "random_bucket" : 2365,
+ * "first_name" : "Jane",
+ * "last_name" : "Doe",
+ * "email" : "example@braze.com",
+ * "dob" : "1980-12-21",
+ * "home_city" : "Chicago",
+ * "country" : "US",
+ * "phone" : "+442071838750",
+ * "language" : "en",
+ * "time_zone" : "Eastern Time (US & Canada)",
+ * "last_coordinates" : [41.84157636433568, -87.83520818508256],
+ * "gender" : "F",
+ * "total_revenue" : 65,
+ * "attributed_campaign" : "braze_test_campaign_072219",
+ * "attributed_source" : "braze_test_source_072219",
+ * "attributed_adgroup" : "braze_test_adgroup_072219",
+ * "attributed_ad" : "braze_test_ad_072219",
+ * "custom_attributes":
+ * {
+ * "loyaltyId": "37c98b9d-9a7f-4b2f-a125-d873c5152856",
+ * "loyaltyPoints": "321",
+ * "loyaltyPointsNumber": 107
+ * },
+ * "custom_events": [
+ * {
+ * "name": "Loyalty Acknowledgement",
+ * "first": "2021-06-28T17:02:43.032Z",
+ * "last": "2021-06-28T17:02:43.032Z",
+ * "count": 1
+ * },
+ * ...
+ * ],
+ * "purchases": [
+ * {
+ * "name": "item_40834",
+ * "first": "2021-09-05T03:45:50.540Z",
+ * "last": "2022-06-03T17:30:41.201Z",
+ * "count": 10
+ * },
+ * ...
+ * ],
+ * "devices": [
+ * {
+ * "model": "Pixel XL",
+ * "os": "Android (Q)",
+ * "carrier": null,
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "ad_tracking_enabled": true
+ * },
+ * ...
+ * ],
+ * "apps": [
+ * {
+ * "name": "MovieCannon",
+ * "platform": "Android",
+ * "version": "3.29.0",
+ * "sessions": 1129,
+ * "first_used": "2020-02-02T19:56:19.142Z",
+ * "last_used": "2021-11-11T00:25:19.201Z"
+ * },
+ * ...
+ * ],
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupBadRequestException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupForbiddenException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupNotFoundException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupInternalServerErrorException
+ */
+ public function postUsersExportGlobalControlGroup(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersExportGlobalControlGroup($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update and end [Live Activities](https://www.braze.com/docs/developer_guide/platform_integration_guides/swift/live_activities/live_activities/) displayed by your iOS app. This endpoint requires additional setup.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.live_activity.update` permission.
+ *
+ * Before using this endpoint, you must register an activity with the Braze Swift SDK using the [`launchActivity`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/liveactivities-swift.class/launchactivity(pushtokentag:activity:fileid:line:)) method. Required request parameters will be defined during this step. Refer to [Live Activities](https://www.braze.com/docs/developer_guide/platform_integration_guides/swift/live_activities/live_activities/) for more information on registration.
+ *
+ * Once you have registered your activity, pass a JSON payload with updates to the Apple Push Notification service (APNs) through this endpoint. See Apple’s documentation on [updating your Live Activity with push notification payloads](https://developer.apple.com/documentation/activitykit/updating-and-ending-your-live-activity-with-activitykit-push-notifications) for more information.
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `app_id` | Required | String | App [API identifier]({{site.baseurl}}/api/identifier_types/#the-app-identifier) retrieved from **Settings > Setup and Testing > API Keys.** |
+ * | `activity_id` | Required | String | When you register your Live Activity using [`launchActivity`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/liveactivities-swift.class), you use the `pushTokenTag` parameter to name the Activity's push token to a custom string.
Set `activity_id` to this custom string to define which Live Activity you want to update. |
+ * | `content_state` | Required | Object | You define the `ContentState` parameters when you create your Live Activity. Pass the updated values for your `ContentState` using this object.
The format of this request must match the shape you initially defined. |
+ * | `end_activity` | Optional | Boolean | If `true`, this request ends the Live Activity. |
+ * | `dismissal_date` | Optional | Datetime
([ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) string) | This parameter defines the time to remove the Live Activity from the user's UI. If this time is in the past, the Live Activity will be removed immediately. |
+ * | `stale_date` | Optional | Datetime
([ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) string) | This parameter tells the system when the Live Activity content is marked as outdated in the user's UI. |
+ * | `notification` | Optional | Object |
Include an [`apple_push`]({{site.baseurl}}/api/objects_filters/messaging/apple_object/) object to define a push notification. This behavior of this push notification depends on if the user is active or if the user is using a proxy device. {::nomarkdown}
If a notification
is included and the user is active on their iPhone when the update is delivered, the updated Live Activity UI will slide down and display like a push notification.
If a notification
is included and the user is not active on their iPhone, their screen will light up to display the updated Live Activity UI on their lock screen.
The notification alert
will not display as a standard push notification. Additionally, if a user has a proxy device, like an Apple Watch, the alert
will be displayed there.
|
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `201` and `4XX`.
+ *
+ * ### Example success response
+ *
+ * A `201` status code is returned if the request was formatted correctly and we received the request. The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The `4XX` class of status code indicates a client error. Refer to the [API errors and responses article]({{site.baseurl}}/api/errors/) for more information about errors you may encounter.
+ *
+ * The status code `400` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "error": "\nProblem:\n message body does not match declared format\nResolution:\n when specifying application/json as content-type, you must pass valid application/json in the request's 'body' "
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateBadRequestException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateForbiddenException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateNotFoundException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateInternalServerErrorException
+ */
+ public function postMessagesLiveActivityUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostMessagesLiveActivityUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to return a JSON list of information about scheduled campaigns and entry Canvases between now and a designated `end_time` specified in the request.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule_broadcasts` permission.
+ *
+ * Daily, recurring messages will only appear once with their next occurrence. Results returned in this endpoint are only for campaigns and Canvases created and scheduled in Braze.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "scheduled_broadcasts": [
+ * {
+ * "name" (string) the name of the scheduled boradcast,
+ * "id" (stings) the Canvas or campaign identifier,
+ * "type" (string) the broadcast type either Canvas or Campaign,
+ * "tags" (array) an array of tag names formatted as strings,
+ * "next_send_time" (string) The next send time formatted in ISO 8601, may also include time zone if not local/intelligent delivery,
+ * "schedule_type" (string) The schedule type, either local_time_zones, intelligent_delivery or the name of your company's time zone,
+ * },
+ * ]
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $end_time (Required) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
+ *
+ * End date of the range to retrieve upcoming scheduled Campaigns and Canvases. This is treated as midnight in UTC time by the API.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastBadRequestException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastUnauthorizedException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastForbiddenException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastNotFoundException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastTooManyRequestsException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastInternalServerErrorException
+ */
+ public function getMessagesScheduledBroadcast(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetMessagesScheduledBroadcast($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to cancel a message that you previously scheduled before it has been sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule.delete` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `schedule_id` | Required | String | The schedule_id to delete (obtained from the response to create schedule). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteBadRequestException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteForbiddenException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteNotFoundException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteInternalServerErrorException
+ */
+ public function postMessagesScheduleDelete(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostMessagesScheduleDelete($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to cancel a Canvas message that you previously scheduled via API-triggered before it has been sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.schedule.delete` permission.
+ *
+ * Scheduled messages or triggers that are deleted very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second deletions could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://braze.com/docs/api/identifier_types/). |
+ * | `schedule_id` | Required | String | The `schedule_id` to delete (obtained from the response to create schedule). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteInternalServerErrorException
+ */
+ public function postCanvasTriggerScheduleDelete(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCanvasTriggerScheduleDelete($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > The delete schedule endpoint allows you to cancel a message that you previously scheduled API-triggered Canvases before it has been sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.schedule.delete` permission.
+ *
+ * Scheduled messages or triggers that are deleted very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second deletions could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `schedule_id` | Required | String | The `schedule_id` to delete (obtained from the response to create schedule). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteInternalServerErrorException
+ */
+ public function postCampaignsTriggerScheduleDelete(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCampaignsTriggerScheduleDelete($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to schedule a campaign, Canvas, or other message to be sent at a designated time (up to 90 days in the future) and provides you with an identifier to reference that message for updates.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule.create` permission.
+ *
+ * If you are targeting a segment, a record of your request will be stored in the [Developer Console](https://dashboard.braze.com/app_settings/developer_console/activitylog/) after all scheduled messages have been sent.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific external_ids, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `external_user_ids` | Optional | Array of strings | See [external user identifier](https://www.braze.com/docs/api/parameters/#external-user-id). |
+ * | `user_aliases` | Optional | Array of user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `segment_id` | Optional | String | See [segment identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `recipients` | Optional | Array of recipients objects | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `override_messaging_limits` | Optional | Boolean | Ignore global rate limits for campaigns, defaults to false |
+ * | `recipient_subscription_state` | Optional | String | Use this to send messages to only users who have opted in (`opted_in`), only users who have subscribed or are opted in (`subscribed`) or to all users, including unsubscribed users (`all`).
Using `all` users is useful for transactional email messaging. Defaults to `subscribed`. |
+ * | `schedule` | Required | Schedule object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/) |
+ * | `messages` | Optional | Messaging object | See available [messaging objects](https://www.braze.com/docs/api/objects_filters/#messaging-objects). |
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * ``` json
+ * {
+ * "dispatch_id": (string) the dispatch identifier,
+ * "schedule_id": (string) the schedule identifier,
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostMessagesScheduleCreateBadRequestException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateForbiddenException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateNotFoundException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateInternalServerErrorException
+ */
+ public function postMessagesScheduleCreate(\stdClass $requestBody = null, string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostMessagesScheduleCreate($requestBody), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to send dashboard created campaign messages (up to 90 days in advance) via API-triggered delivery, allowing you to decide what action should trigger the message to be sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.schedule.create` permission.
+ *
+ * You can pass in `trigger_properties` that will be templated into the message itself.
+ *
+ * Note that to send messages with this endpoint, you must have a [Campaign ID](https://www.braze.com/docs/api/identifier_types/), created when you build an [API-Triggered Campaign](https://www.braze.com/docs/api/api_campaigns/).
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific external_ids, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/) |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `recipients` | Optional | Array of recipient objects | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `trigger_properties` | Optional | Object | Personalization key-value pairs for all users in this send. See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). |
+ * | `schedule` | Required | Schedule object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-API-KEY-HERE
+ * {
+ * {
+ * "dispatch_id": "dispatch_identifier",
+ * "schedule_id": "schedule_identifier",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateInternalServerErrorException
+ */
+ public function postCampaignsTriggerScheduleCreate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCampaignsTriggerScheduleCreate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to schedule Canvas messages (up to 90 days in advance) via API-triggered delivery, allowing you to decide what action should trigger the message to be sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.schedule.create` permission.
+ *
+ * You can pass in `canvas_entry_properties` that will be templated into the messages sent by the first steps of the Canvas.
+ *
+ * Note that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier) created when you build a Canvas.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific external_ids, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `recipients` | Optional | Array of recipient objects | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `trigger_properties` | Optional | Object | Personalization key-value pairs for all users in this send. See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). |
+ * | `schedule` | Required | Schedule object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateInternalServerErrorException
+ */
+ public function postCanvasTriggerScheduleCreate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCanvasTriggerScheduleCreate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update scheduled messages.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule.update` permission.
+ *
+ * This endpoint accepts updates to either the `schedule` or `messages` parameter or both. Your request must contain at least one of those two keys.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `schedule_id` | Required | String | The `schedule_id` to update (obtained from the response to create schedule). |
+ * | `schedule` | Optional | Object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ * | `messages` | Optional | Object | See available [message objects](https://www.braze.com/docs/api/objects_filters/#messaging-objects). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateBadRequestException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateForbiddenException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateNotFoundException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateInternalServerErrorException
+ */
+ public function postMessagesScheduleUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostMessagesScheduleUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update scheduled API-triggered campaigns created in the dashboard, allowing you to decide what action should trigger the message to be sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.schedule.update` permission.
+ *
+ * You can pass in `trigger_properties` that will be templated into the message itself.
+ *
+ * Note that to send messages with this endpoint, you must have a campaign ID, created when you build an [API-triggered campaign](https://www.braze.com/docs/api/api_campaigns/).
+ *
+ * Any schedule will completely overwrite the one that you provided in the create schedule request or in previous update schedule requests. For example, if you originally provide `"schedule" : {"time" : "2015-02-20T13:14:47", "in_local_time" : true}` and then in your update you provide `"schedule" : {"time" : "2015-02-20T14:14:47"}`, your message will now be sent at the provided time in UTC, not in the user's local time. Scheduled triggers that are updated very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second changes could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/) |
+ * | `schedule_id` | Optional | String | The `schedule_id` to update (obtained from the response to create schedule). |
+ * | `schedule` | Required | Object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateInternalServerErrorException
+ */
+ public function postCampaignsTriggerScheduleUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCampaignsTriggerScheduleUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update scheduled API-triggered Canvases that were created in the dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.schedule.update` permission.
+ *
+ * This allows you to decide what action should trigger the message to be sent. You can pass in `trigger_properties` that will be templated into the message itself.
+ *
+ * Note that to send messages with this endpoint, you must have a Canvas ID, created when you build a [Canvas](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier).
+ *
+ * Any schedule will completely overwrite the one that you provided in the create schedule request or in previous update schedule requests. For example, if you originally provide `"schedule" : {"time" : "2015-02-20T13:14:47", "in_local_time" : true}` and then in your update you provide `"schedule" : {"time" : "2015-02-20T14:14:47"}`, your message will now be sent at the provided time in UTC, not in the user's local time. Scheduled triggers that are updated very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second changes could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `schedule_id` | Optional | String | The `schedule_id` to update (obtained from the response to create schedule). |
+ * | `schedule` | Required | Object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateInternalServerErrorException
+ */
+ public function postCanvasTriggerScheduleUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCanvasTriggerScheduleUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create send IDs that can be used to send messages and track message performance programatically, without campaign creation for each send.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sends.id.create` permission.
+ *
+ * Using the send identifier to track and send messages is useful if you are planning to programmatically generate and send content.
+ *
+ * ## Rate limit
+ *
+ * The daily maximum number of custom send identifiers that can be created via this endpoint is 100 for a given app group. Each `send_id` and `campaign_id` combination that you create will count towards your daily limit. The response headers for any valid request include the current rate limit status, see [API rate limits](https://www.braze.com/docs/api/api_limits/) for details.
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier]({{site.baseurl}}/api/identifier_types/). |
+ * | `send_id` | Optional | String | See [send identifier]({{site.baseurl}}/api/identifier_types/). |
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": "success",
+ * "send_id" : (string) the send identifier
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostSendsIdCreateBadRequestException
+ * @throws \Braze\Exception\PostSendsIdCreateUnauthorizedException
+ * @throws \Braze\Exception\PostSendsIdCreateForbiddenException
+ * @throws \Braze\Exception\PostSendsIdCreateNotFoundException
+ * @throws \Braze\Exception\PostSendsIdCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostSendsIdCreateInternalServerErrorException
+ */
+ public function postSendsIdCreate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostSendsIdCreate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to send immediate, ad-hoc messages to designated users via the Braze API.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.send` permission.
+ *
+ * Be sure to include Messaging Objects in your body to complete your requests.
+ *
+ * If you are targeting a segment, a record of your request will be stored in the [Developer Console](https://dashboard.braze.com/app_settings/developer_console/activitylog/).
+ *
+ * ## Rate limit
+ *
+ * When specifying a segment or Connected Audience in your request, we apply a rate limit of 250 requests per minute to this endpoint. Otherwise, if specifying an `external_id`, this endpoint has a default rate limit of 250,000 requests per hour, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific `external_ids`, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your messages to a larger than expected audience. |
+ * | `external_user_ids` | Optional | Array of strings | See [external user ID](https://www.braze.com/docs/api/parameters/#external-user-id). |
+ * | `user_aliases` | Optional | Array of user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/). |
+ * | `segment_id` | Optional | String | See [segment identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `campaign_id` | Optional\* | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/) for more information.
\*Required if you wish to track campaign stats (e.g. sends, clicks, bounces, etc) on the Braze dashboard. |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/) |
+ * | `override_frequency_capping` | Optional | Boolean | Ignore \`frequency_capping\` for campaigns, defaults to false. |
+ * | `recipient_subscription_state` | Optional | String | Use this to send messages to only users who have opted in (`opted_in`), only users who have subscribed or are opted in (`subscribed`) or to all users, including unsubscribed users (`all`).
Using `all` users is useful for transactional email messaging. Defaults to `subscribed`. |
+ * | `messages` | Optional | Messaging objects | See available [messaging objects](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_messages/#available-messaging-objects). |
+ *
+ * ## Response details
+ *
+ * Message sending endpoint responses will include the message’s `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the id of the message dispatch (unique id for each ‘transmission’ sent from the Braze platform). For more, information refer to [Dispatch ID behavior](https://www.braze.com/docs/help/help_articles/data/dispatch_id/).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostMessagesSendBadRequestException
+ * @throws \Braze\Exception\PostMessagesSendUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesSendForbiddenException
+ * @throws \Braze\Exception\PostMessagesSendNotFoundException
+ * @throws \Braze\Exception\PostMessagesSendTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesSendInternalServerErrorException
+ */
+ public function postMessagesSend(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostMessagesSend($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to send immediate, ad-hoc transactional messages to a designated user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `transactional.send` permission.
+ *
+ * This endpoint is used alongside the creation of a [Transactional Email campaign](https://www.braze.com/docs/api/api_campaigns/transactional_campaigns) and corresponding campaign ID.
+ *
+ * > **Important:** Transactional Email is currently available as part of select Braze packages. Reach out to your Braze customer success manager for more details.
+ *
+ *
+ * Similar to the [Send triggered campaign endpoint](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_campaigns/), this campaign type allows you to house message content inside of the Braze dashboard while dictating when and to whom a message is sent via your API. Unlike the Send triggered campaign endpoint, which accepts an audience or segment to send messages to, a request to this endpoint must specify a single user either by `external_user_id` or `user_alias`, as this campaign type is purpose-built for 1:1 messaging of alerts like order confirmations or password resets.
+ *
+ * ## Rate limit
+ *
+ * Transactional Emails are not subject to a rate limit. Depending on your chosen package, a set number of Transactional Emails is covered per hour by SLA. Requests that exceed that rate will still send, but are not covered by SLA. 99.9% of emails will send in less than one minute.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | ID of the campaign |
+ *
+ * ## Request Parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_send_id` | Optional | String | A Base64 compatible string. Validated against the following regex `/^[a-zA-Z0-9-_+\/=]+$/`. This optional field allows you to pass an internal identifier for this particular send which will be included in events sent from the Transactional HTTP event postback. When passed, this identifier will also be used as a deduplication key, which Braze will store for 24 hours. Passing the same identifier in another request will not result in a new instance of a send by Braze for 24 hours. |
+ * | `trigger_properties` | Optional | Object | See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). Personalization key-value pairs that will apply to the user in this request. |
+ * | `recipients` | Required | Object | The user you are targeting this message to. Can contain `attributes` and a single `external_user_id` or `user_alias`.
Note that if you provide an external user ID that doesn’t already exist in Braze, passing any fields to the `attributes` object will create this user profile in Braze and send this message to the newly created user.
If you send multiple requests to the same user with different data in the `attributes` object, Braze will ensure that `first_name`, `last_name`, and `email` attributes will be updated synchronously and templated into your message. Custom attributes don’t have this same protection, so proceed with caution when updating a user through this API and passing different custom attribute values in quick succession. |
+ *
+ * ## Response
+ *
+ * The send transactional email endpoint will respond with the message’s `dispatch_id` which represents the instance of this message send. This identifier can be used along with events from the Transactional HTTP event postback to trace the status of an individual email sent to a single user.
+ *
+ * ### Example response
+ *
+ * ``` json
+ * {
+ * "dispatch_id": Out-of-the-box generated Unique ID of the instance of this send
+ * "status": Current status of the message
+ * "metadata": Object containing additional information about the send instance
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The endpoint may also return an error code and a human-readable message in some cases, most of which are validation errors. Here are some common errors you may get when making invalid requests.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `The campaign is not a transactional campaign. Only transactional campaigns may use this endpoint` | The campaign ID provided is not for a transactional campaign. |
+ * | `The external reference has been queued. Please retry to obtain send_id.` | The external_send_id has been created recently, try a new external_send_id if you are intending to send a new message. |
+ * | `Campaign does not exist` | The campaign ID provided does not correspond to an existing campaign. |
+ * | `The campaign is archived. Unarchive the campaign to ensure trigger requests will take effect.` | The campaign ID provided corresponds to an archived campaign. |
+ * | `The campaign is paused. Resume the campaign to ensure trigger requests will take effect.` | The campaign ID provided corresponds to a paused campaign. |
+ * | `campaign_id must be a string of the campaign api identifier` | The campaign ID provided is not a valid format. |
+ * | `Error authenticating credentials` | The API key provided is invalid |
+ * | `Invalid whitelisted IPs` | The IP address sending the request is not on the IP whitelist (if it is being utilized) |
+ * | `You do not have permission to access this resource` | The API key used does not have permission to take this action |
+ *
+ * Most endpoints at Braze have a rate limit implementation that will return a 429 response code if you have made too many requests. The transactional sending endpoint works differently -- if you exceed your allotted rate limit, our system will continue to ingest the API calls, return success codes, and send the messages, however those messages may not be subject to the contractual SLA for the feature. Please reach out if you need more information about this functionality.
+ *
+ * ## Transactional HTTP Event Postback
+ *
+ * All transactional emails are complemented with event status postbacks sent as an HTTP request back to your specified URL. This will allow you to evaluate the message status in real-time and take action to reach the user on another channel if the message goes undelivered, or fallback to an internal system if Braze is experiencing latency.
+ *
+ * In order to associate the incoming events to a particular instance of send, you can choose to either capture and store the Braze `dispatch_id` returned in the [API response](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_transactional_message/#example-response), or pass your own identifier to the `external_send_id` field. An example of a value you may choose to pass to that field may be an order ID, where after completing order 1234, an order confirmation message is triggered to the user through Braze, and `external_send_id : 1234` is included in the request. All following event postbacks such as `Sent` and `Delivered` will include `external_send_id : 1234` in the payload allowing you to confirm that user successfully received their order confirmation email.
+ *
+ * To get started using the Transactional HTTP Event Postback, navigate to **Settings** > **Workspace Settings** > **Email Preferences**. in your Braze dashboard and input your desired URL to receive postbacks.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), **Email Preferences** can be found at ****Manage Settings** > **Email Settings****.
+ *
+ * ### Postback body
+ *
+ * ``` json
+ * // Sent Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "sent",
+ * "metadata": {
+ * "received_at": "2020-08-31T18:58:41.000+00:00",
+ * "enqueued_at": "2020-08-31T18:58:41.000+00:00",
+ * "executed_at": "2020-08-31T18:58:41.000+00:00",
+ * "sent_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Processed Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "processed",
+ * "metadata": {
+ * "processed_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Aborted
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "aborted",
+ * "metadata": {
+ * "reason": "User not emailable",
+ * "aborted_at": "2020-08-31T19:04:51.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Delivered Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "delivered",
+ * "metadata": {
+ * "delivered_at": "2020-08-31T18:27:32.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Bounced Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "bounced",
+ * "metadata": {
+ * "bounced_at": "2020-08-31T18:58:43.000+00:00",
+ * "reason": "550 5.1.1 The email account that you tried to reach does not exist",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ *
+ * ```
+ *
+ * #### Message status
+ *
+ * | **Status** | **Description** |
+ * | --- | --- |
+ * | `sent` | Message successfully dispatched to Braze’s email sending partner |
+ * | `processed` | Email sending partner has successfully received and prepared the message for sending to the user’s inbox provider |
+ * | `aborted` | Braze was unable to successfully dispatch the message due to the user not having an emailable address, or Liquid abort logic was called in the message body. All aborted events include a reason field within the metadata object indicating why the message was aborted |
+ * | `delivered` | Message was accepted by the user’s email inbox provider |
+ * | `bounced` | Message was rejected by the user’s email inbox provider. All bounced events include a reason field within the metadata object reflecting the bounce error code provided by the inbox provider |
+ *
+ * ### Example postback
+ *
+ * ``` json
+ * // Sent Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "sent",
+ * "metadata": {
+ * "received_at": "2020-08-31T18:58:41.000+00:00",
+ * "enqueued_at": "2020-08-31T18:58:41.000+00:00",
+ * "executed_at": "2020-08-31T18:58:41.000+00:00",
+ * "sent_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Processed Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "processed",
+ * "metadata": {
+ * "processed_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Aborted
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "aborted",
+ * "metadata": {
+ * "reason": "User not emailable",
+ * "aborted_at": "2020-08-31T19:04:51.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Delivered Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "delivered",
+ * "metadata": {
+ * "delivered_at": "2020-08-31T18:27:32.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Bounced Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "bounced",
+ * "metadata": {
+ * "bounced_at": "2020-08-31T18:58:43.000+00:00",
+ * "reason": "550 5.1.1 The email account that you tried to reach does not exist",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendBadRequestException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendUnauthorizedException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendForbiddenException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendNotFoundException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendTooManyRequestsException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendInternalServerErrorException
+ */
+ public function postTransactionalV1CampaignsByCampaignIdSend(string $campaignId, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostTransactionalV1CampaignsByCampaignIdSend($campaignId, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to send immediate, ad-hoc messages to designated users via API-triggered delivery.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.send` permission.
+ *
+ * API-triggered delivery allows you to house message content inside of the Braze dashboard while dictating when a message is sent, and to whom via your API.
+ *
+ * If you are targeting a segment, a record of your request will be stored in the [Developer Console](https://dashboard.braze.com/app_settings/developer_console/activitylog/). Note that to send messages with this endpoint, you must have a [campaign ID](https://www.braze.com/docs/api/identifier_types/) created when you build an [API-triggered campaign](https://www.braze.com/docs/api/api_campaigns/).
+ *
+ * ## Rate limit
+ *
+ * When specifying a segment or Connected Audience in your request, we apply a rate limit of 250 requests per minute to this endpoint. Otherwise, if specifying an `external_id`, this endpoint has a default rate limit of 250,000 requests per hour, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific `external_ids`, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `trigger_properties` | Optional | Object | See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). Personalization key-value pairs that will apply to all users in this request. |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your campaign to a larger than expected audience. |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `recipients` | Optional | Array | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). If not provided and `broadcast` is set to true, the message will send to the entire segment targeted by the campaign. |
+ *
+ * The recipients array may contain up to 50 objects, with each object containing a single `external_user_id` string and `trigger_properties` object.
+ *
+ * When `send_to_existing_only` is `true`, Braze will only send the message to existing users. When `send_to_existing_only` is `false` and a user with the given `id` does not exist, Braze will create a user with that id and attributes before sending the message.
+ *
+ * > Important: A user’s subscription group status can be updated via the inclusion of a subscription_groups parameter within the attributes object. This is currently in early access. Contact your Braze customer success manager if you’re interested in participating in the early access. More details can be found in the [User attributes object](https://www.braze.com/docs/api/objects_filters/user_attributes_object).
+ *
+ *
+ * ## Response details
+ *
+ * Message sending endpoint responses will include the message’s `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the ID of the message dispatch, a unique ID for each transmission sent from the Braze platform. When using this endpoint, you receive a single `dispatch_id` for an entire batched set of users. For more information on `dispatch_id` check out out our documentation on [Dispatch ID Behavior](https://www.braze.com/docs/help/help_articles/data/dispatch_id/).
+ *
+ * ## Create send endpoint
+ *
+ **Using the attributes object in campaigns**
+ *
+ * Braze has a Messaging Object called `Attributes` that will allow you to add, create, or update attributes and values for a user before you send them an API-triggered campaigns using the `campaign/trigger/send` endpoint as this API call will process the User Attributes object before it processes and sends the campaign. This helps minimize the risk of there being issues caused by [race conditions](https://www.braze.com/docs/help/best_practices/race_conditions/).
+ *
+ * > **Important:** Looking for the Canvas version of this endpoint? Check out [Sending Canvas messages via API-triggered delivery](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_canvases/#create-send-endpoint).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerSendBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendInternalServerErrorException
+ */
+ public function postCampaignsTriggerSend(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCampaignsTriggerSend($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to send Canvas messages via API-triggered delivery.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.send` permission.
+ *
+ * API-triggered delivery allows you to house message content inside of the Braze dashboard while dictating when a message is sent, and to whom via your API.
+ *
+ * Note that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier) created when you build a Canvas.
+ *
+ * ## Rate limit
+ *
+ * When specifying a segment or Connected Audience in your request, we apply a rate limit of 250 requests per minute to this endpoint. Otherwise, if specifying an `external_id`, this endpoint has a default rate limit of 250,000 requests per hour, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific `external_ids`, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `canvas_entry_properties` | Optional | Object | See [Canvas entry properties](https://www.braze.com/docs/api/objects_filters/canvas_entry_properties_object/). Personalization key-value pairs that will apply to all users in this request. The Canvas entry properties object has a maximum size limit of 50 KB. |
+ * | `broadcast` | Optional | Boolean | You must set `broadcast` to true when sending a message to an entire segment that a campaign or Canvas targets. This parameter defaults to false (as of August 31, 2017).
If `broadcast` is set to true, a recipients list cannot be included. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `audience` | Optional | Connected audience object | See [Connected audience](https://braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `recipients` | Optional | Array | See [Recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). If not provided and `broadcast` is set to true, the message will send to the entire segment targeted by the Canvas.
The `recipients` array may contain up to 50 objects, with each object containing a single `external_user_id` string and `canvas_entry_properties` object. Either `external_user_id` or user_alias is required for this call. Requests must specify only one.
When `send_to_existing_only` is true, Braze will only send the message to existing users—however this flag can’t be used with user aliases. When `send_to_existing_only` is `false` and a user with the given `id` does not exist, Braze will create a user with that ID and attributes before sending the message. |
+ *
+ * Customers using the API for server-to-server calls may need to whitelist the appropriate API URL if they’re behind a firewall.
+ *
+ * > **Note:** If you include both specific users in your API call and a target segment in the dashboard, the message will send to specifically the user profiles that are in the API call and qualify for the segment filters.
+ *
+ *
+ * ## Response details
+ *
+ * Message sending endpoint responses will include the message’s `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the ID of the message dispatch (unique ID for each “transmission” sent from the Braze platform). Check out [Dispatch ID behavior](https://www.braze.com/docs/help/help_articles/data/dispatch_id/) for more information.
+ *
+ * ## Create send endpoint
+ *
+ **Using the Attributes Object in Canvas**
+ *
+ * Braze has a Messaging Object called `Attributes` that allows you to add, create, or update attributes and values for a user before sending them an API-Triggered Canvas using the `canvas/trigger/send` endpoint as this API call will process the User Attributes object before it processes and sends the Canvas. This helps minimize the risk of there being issues caused by [race conditions](https://www.braze.com/docs/help/best_practices/race_conditions/).
+ *
+ * > **Important:** Looking for the camaigns version of this endpoint? Check out [Sending campaign messages via API-triggered delivery](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_campaigns/).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerSendBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerSendUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerSendForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerSendNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerSendTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerSendInternalServerErrorException
+ */
+ public function postCanvasTriggerSend(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostCanvasTriggerSend($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to generate a URL for a preference center.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.user.get` permission.
+ *
+ * Each preference center URL is unique to each user.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 1,000 requests per minute, per workspace.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preferenceCenterExternalID` | Required | String | The ID for your preference center. |
+ * | `userID` | Required | String | The user ID. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/preference_center/v1/$preference_center_external_id/url/$user_external_id' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "preference_center_url": "https://www.example.com/preferences"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $preference_center_api_id
+ * @var string $external_id (Required) String
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDBadRequestException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDUnauthorizedException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDForbiddenException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDNotFoundException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDTooManyRequestsException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDInternalServerErrorException
+ */
+ public function getPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserID(string $preferenceCenterExternalID, string $userID, array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserID($preferenceCenterExternalID, $userID, $queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to list your available preference centers.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.list` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 1,000 requests per minute, per workspace.
+ *
+ * ## Path and request parameters
+ *
+ * There are no path or request parameters for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location -g --request GET https://rest.iad-01.braze.com/preference_center/v1/list \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "preference_centers": [
+ * {
+ * "name": "My Preference Center 1",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-08-17T15:46:10Z",
+ * "updated_at": "2022-08-17T15:46:10Z"
+ * },
+ * {
+ * "name": "My Preference Center 2",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-08-19T11:13:06Z",
+ * "updated_at": "2022-08-19T11:13:06Z"
+ * },
+ * {
+ * "name": "My Preference Center 3",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-08-19T11:30:50Z",
+ * "updated_at": "2022-08-19T11:30:50Z"
+ * },
+ * {
+ * "name": "My Preference Center 4",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-09-13T20:41:34Z",
+ * "updated_at": "2022-09-13T20:41:34Z"
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListBadRequestException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListUnauthorizedException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListForbiddenException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListNotFoundException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListTooManyRequestsException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListInternalServerErrorException
+ */
+ public function getPreferenceCenterV1List(array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetPreferenceCenterV1List($headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to view the details for your preference centers, including when it was created and updated.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.get` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 1,000 requests per minute, per workspace.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preferenceCenterExternalID` | Required | String | The ID for your preference center. |
+ *
+ * ## Request parameters
+ *
+ * There are no request parameters for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location -g --request GET https://rest.iad-01.braze.com/preference_center/v1/preference_center_external_id \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "name": "My Preference Center",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "example_time_created",
+ * "updated_at": "example_time_updated",
+ * "preference_center_title": "Example preference center title",
+ * "preference_center_page_html": "HTML for preference center here",
+ * "confirmation_page_html": "HTML for confirmation page here",
+ * "redirect_page_html": null,
+ * "preference_center_options": {
+ * "meta-viewport-content": "width=device-width, initial-scale=2"
+ * },
+ * "state": "active"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException
+ */
+ public function getPreferenceCenterV1ByPreferenceCenterExternalID(string $preferenceCenterExternalID, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetPreferenceCenterV1ByPreferenceCenterExternalID($preferenceCenterExternalID, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update a preference center.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.update` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 10 requests per minute, per workspace.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preferenceCenterExternalID` | Required | String | The ID for your preference center. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preference_center_page_html` | Required | String | The HTML for the preference center page. |
+ * | `preference_center_title` | Optional | String | The title for the preference center and confirmation pages. If a title is not specified, the title of the pages will default to "Preference Center". |
+ * | `confirmation_page_html` | Required | String | The HTML for the confirmation page. |
+ * | `state` | Optional | String | Choose `active` or `draft`. |
+ * | `options` | Optional | Object | Attributes: `meta-viewport-content`. When present, a `viewport` meta tag will be added to the page with `content=` . |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-01.braze.com/preference_center/v1/{preferenceCenterExternalId}' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE' \
+ * --data-raw '{
+ * "name": "Example",
+ * "preference_center_title": "Example Preference Center Title",
+ * "preference_center_page_html": "HTML for preference center here",
+ * "confirmation_page_html": "HTML here with a message to users here",
+ * "state": "active"
+ * }
+ * '
+ *
+ * ```
+ *
+ * ## Example response
+ *
+ * ```
+ * {
+ * "preference_center_api_id": "8efc52aa-935e-42b7-bd6b-98f43bb9b0f1",
+ * "created_at": "2022-09-22T18:28:07Z",
+ * "updated_at": "2022-09-22T18:32:07Z",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string-Type
+ * @var string
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException
+ */
+ public function putPreferenceCenterV1ByPreferenceCenterExternalID(string $preferenceCenterExternalID, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PutPreferenceCenterV1ByPreferenceCenterExternalID($preferenceCenterExternalID, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create a preference center to allow users to manage their notification preferences for email campaigns.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.update` permission.
+ *
+ * Check out [Creating a preference center via API](https://www.braze.com/docs/user_guide/message_building_by_channel/email/preference_center/) for details on how to include this in your email campaigns.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 10 requests per minute, per workspace.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `name` | Required | String | The name of the preference center that meets the following requirements:
\- Only contains letters, numbers, hyphens, and underscores
\- Does not have spaces |
+ * | `preference_center_title` | Optional | String | The title for the preference center and confirmation pages. If a title is not specified, the title of the pages will default to "Preference Center". |
+ * | `preference_center_page_html` | Required | String | The HTML for the preference center page. |
+ * | `confirmation_page_html` | Required | String | The HTML for the confirmation page. |
+ * | `state` | Optional | String | Choose `active` or `draft`. Defaults to `active` if not specified. |
+ * | `options` | Optional | Object | Attributes: `meta-viewport-content`. When present, a `viewport` meta tag will be added to the page with `content=` . |
+ *
+ * > **Note:** The preference center name can't be edited once created.
+ *
+ *
+ * ### Liquid tags
+ *
+ * Refer to the following Liquid tags that can be included in your HTML to generate a user's subscription state on the preference center page.
+ *
+ * #### User subscription state
+ *
+ * | Liquid | Description |
+ * | --- | --- |
+ * | `{{subscribed_state.${email_global}}}` | Get the global email subscribed state for the user (i.e., "opted_in", "subscribed", or "unsubscribed". |
+ * | `{{subscribed_state.${}}}` | Get the subscribed state of the specified subscription group for the user (i.e., "subscribed" or "unsubscribed"). |
+ *
+ * #### Form inputs and action
+ *
+ * | Liquid | Description |
+ * | --- | --- |
+ * | `{% form_field_name :email_global_state %}` | Indicates that a specific form input element corresponds to the user's global email subscribed state. The user's selection state should be "opted_in", "subscribed", or "unsubscribed" when the form is submitted with selection data for the global email subscribed state. If it's a checkbox, the user will either be "opted_in" or "unsubscribed". For a hidden input, the "subscribed" state will also be valid. |
+ * | `{% form_field_name :subscription_group %}` | Indicates that a specific form input element corresponds to a given subscription group. The user's selection state should be either "subscribed" or "unsubscribed" when the form is submitted with selection data for a specific subscription group. |
+ * | `{{preference_center_submit_url}}` | Generates URL for form submission. |
+ *
+ * ## Example response
+ *
+ * ```
+ * {
+ * "preference_center_api_id": "preference_center_api_id_example",
+ * "liquid_tag": "{{preference_center.${MyPreferenceCenter2022-09-22}}}",
+ * "created_at": "2022-09-22T18:28:07+00:00",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostPreferenceCenterV1BadRequestException
+ * @throws \Braze\Exception\PostPreferenceCenterV1UnauthorizedException
+ * @throws \Braze\Exception\PostPreferenceCenterV1ForbiddenException
+ * @throws \Braze\Exception\PostPreferenceCenterV1NotFoundException
+ * @throws \Braze\Exception\PostPreferenceCenterV1TooManyRequestsException
+ * @throws \Braze\Exception\PostPreferenceCenterV1InternalServerErrorException
+ */
+ public function postPreferenceCenterV1(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostPreferenceCenterV1($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > This endpoint allows you to permanently delete an existing dashboard user by specifying the resource `id` returned by the SCIM [`POST`](https://www.braze.com/docs/scim/post_create_user_account/) method.
+ *
+ * This is similar to deleting a user in the **Manage Users** section of the Braze dashboard. For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data type | Description |
+ * | --- | --- | --- | --- |
+ * | `id` | Required | String | The user’s resource ID. This parameter is returned by the `POST` `/scim/v2/Users/` or `GET` `/scim/v2/Users?filter=userName eq "[user@test.com](mailto:user@test.com)"` methods. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Response
+ *
+ * ### Example error response
+ *
+ * ``` json
+ * HTTP/1.1 204 Not Found
+ * Content-Type: text/html; charset=UTF-8
+ *
+ * ```
+ *
+ * If a developer with this ID doesn’t exist in Braze, the endpoint will respond with:
+ *
+ * ``` json
+ * HTTP/1.1 404 Not Found Content-Type: text/html; charset=UTF-8
+ * { "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"], "detail": "User not found", "status": 404 }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\DeleteScimV2UserByIdBadRequestException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdUnauthorizedException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdForbiddenException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdNotFoundException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdTooManyRequestsException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdInternalServerErrorException
+ */
+ public function deleteScimV2UserById(string $id, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\DeleteScimV2UserById($id, $headerParameters), $fetch);
+ }
+
+ /**
+ * > This endpoint allows you to look up an existing dashboard user account by specifying the resource `id` returned by the SCIM [`POST`](https://www.braze.com/docs/scim/post_create_user_account/) method.
+ *
+ * For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, DELETE, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `id` | Required | String | The user's resource ID. This parameter is returned by the `POST` `/scim/v2/Users/` or `GET` `/scim/v2/Users?filter=userName eq "user@test.com"` methods. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "userName": "user@test.com",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "241adcd25789fabcded",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["admin"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetScimV2UserByIdBadRequestException
+ * @throws \Braze\Exception\GetScimV2UserByIdUnauthorizedException
+ * @throws \Braze\Exception\GetScimV2UserByIdForbiddenException
+ * @throws \Braze\Exception\GetScimV2UserByIdNotFoundException
+ * @throws \Braze\Exception\GetScimV2UserByIdTooManyRequestsException
+ * @throws \Braze\Exception\GetScimV2UserByIdInternalServerErrorException
+ */
+ public function getScimV2UserById(string $id, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetScimV2UserById($id, $headerParameters), $fetch);
+ }
+
+ /**
+ * > This endpoint allows you to update an existing dashboard user account by specifying the resource `id` returned by the SCIM [`POST`](https://www.braze.com/docs/scim/post_create_user_account/) method.
+ *
+ * It allows you to update of given and family names, permissions (for setting permissions at the company, app group, and team level) and department. For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * For security reasons, `userName` (email address) cannot be updated through this endpoint. If you would like to change the `userName` (email address) for a user, contact [Support](https://www.braze.com/docs/support_contact/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` GET, DELETE, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `id` | Required | String | The user's resource ID. This parameter is returned by the `POST` `/scim/v2/Users/` or `GET` `/scim/v2/Users?filter=userName eq "user@test.com"` methods. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data type | Description |
+ * | --- | --- | --- | --- |
+ * | `schemas` | Required | Array of strings | Expected SCIM 2.0 schema name for user object. |
+ * | `name` | Required | JSON object | This object contains the user's given name and family name. |
+ * | `department` | Required | String | Valid department string from the [department string documentation]({{site.baseurl}}/scim_api_appendix/#department-strings). |
+ * | `permissions` | Required | JSON object | Permissions object as described in the [permissions object documentation]({{site.baseurl}}/scim_api_appendix/#permissions-object). |
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "userName": "user@test.com",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "2519dafcdba238ae7",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["admin"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * ### Error states
+ *
+ * If a user with this ID doesn’t exist in Braze, the endpoint will respond with:
+ *
+ * ``` json
+ * HTTP/1.1 404 Not Found
+ * Content-Type: text/html; charset=UTF-8
+ * {
+ * "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
+ * "detail": "User not found",
+ * "status": 404
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PutScimV2UserByIdBadRequestException
+ * @throws \Braze\Exception\PutScimV2UserByIdUnauthorizedException
+ * @throws \Braze\Exception\PutScimV2UserByIdForbiddenException
+ * @throws \Braze\Exception\PutScimV2UserByIdNotFoundException
+ * @throws \Braze\Exception\PutScimV2UserByIdTooManyRequestsException
+ * @throws \Braze\Exception\PutScimV2UserByIdInternalServerErrorException
+ */
+ public function putScimV2UserById(string $id, \stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PutScimV2UserById($id, $requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > This endpoint allows you to look up an existing dashboard user account by specifying their email in the filter query parameter.
+ *
+ * Note that when the query parameter is URL encoded it will read like this:
+ *
+ * `/scim/v2/Users?filter=userName eq "user@test.com"`
+ *
+ * For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, DELETE, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `userName@example.com` | Required | String | The user's email. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE
+ * Authorization: Bearer YOUR-SCIM-TOKEN-HERE
+ * {
+ * "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
+ * "totalResults": 1,
+ * "Resources": [
+ * {
+ * "userName": "user@test.com",
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "241adcd25789fabcded",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["admin"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $filter
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetScimV2UserBadRequestException
+ * @throws \Braze\Exception\GetScimV2UserUnauthorizedException
+ * @throws \Braze\Exception\GetScimV2UserForbiddenException
+ * @throws \Braze\Exception\GetScimV2UserNotFoundException
+ * @throws \Braze\Exception\GetScimV2UserTooManyRequestsException
+ * @throws \Braze\Exception\GetScimV2UserInternalServerErrorException
+ */
+ public function getScimV2User(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetScimV2User($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > This endpoint allows you to create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).
+ *
+ * For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, and DELETE endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data type | Description |
+ * | --- | --- | --- | --- |
+ * | `schemas` | Required | Array of strings | Expected SCIM 2.0 schema name for user object. |
+ * | `userName` | Required | String | The user’s email address. |
+ * | `name` | Required | JSON object | This object contains the user's given name and family name. |
+ * | `department` | Required | String | Valid department string from the [department string documentation]({{site.baseurl}}/scim_api_appendix/#department-strings). |
+ * | `permissions` | Required | JSON object | Permissions object as described in the [permissions object documentation]({{site.baseurl}}/scim_api_appendix/#permissions-object). |
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "userName": "user@test.com",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "2519dafcdba238ae7",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["basic_access","export_user_data"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * ### Error states
+ *
+ * If a user with this email address already exists in Braze, the endpoint will respond with:
+ *
+ * ``` json
+ * HTTP/1.1 409 Conflict
+ * Date: Tue, 10 Sep 2019 02:22:30 GMT
+ * Content-Type: text/json;charset=UTF-8
+ * {
+ * "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
+ * "detail": "User already exists in the database.",
+ * "status": 409
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostScimV2UserBadRequestException
+ * @throws \Braze\Exception\PostScimV2UserUnauthorizedException
+ * @throws \Braze\Exception\PostScimV2UserForbiddenException
+ * @throws \Braze\Exception\PostScimV2UserNotFoundException
+ * @throws \Braze\Exception\PostScimV2UserTooManyRequestsException
+ * @throws \Braze\Exception\PostScimV2UserInternalServerErrorException
+ */
+ public function postScimV2User(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostScimV2User($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to pull a list of phone numbers that have been deemed “invalid” within a certain time frame.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sms.invalid_phone_numbers` permission.
+ *
+ * - If you provide a `start_date`, an `end_date`, and `phone_numbers`, we prioritize the given phone numbers and disregard the date range.
+ * - If your date range has more than the `limit` number of invalid phone numbers, you will need to make multiple API calls with increasing the `offset` each time until a call returns either fewer than `limit` or zero results.
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * Entries are listed in descending order.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "sms": [
+ * {
+ * "phone": "12345678900",
+ * "invalid_detected_at": "2016-08-25 15:24:32 +0000"
+ * },
+ * {
+ * "phone": "12345678901",
+ * "invalid_detected_at": "2016-08-24 17:41:58 +0000"
+ * },
+ * {
+ * "phone": "12345678902",
+ * "invalid_detected_at": "2016-08-24 12:01:13 +0000"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $start_date (Optional*) String in YYYY-MM-DD format
+ * Start date of the range to retrieve invalid phone numbers, must be earlier than `end_date`. This is treated as midnight in UTC time by the API.
+ * @var string $end_date (Optional*) String in YYYY-MM-DD format
+ * End date of the range to retrieve invalid phone numbers. This is treated as midnight in UTC time by the API.
+ * @var int $limit (Optional) Integer
+ * Optional field to limit the number of results returned. Defaults to 100, maximum is 500.
+ * @var int $offset (Optional) Integer
+ * Optional beginning point in the list to retrieve from
+ * @var int $phone_numbers (Optional*) Array of Strings in e.164 format
+ * If provided, we will return the phone number if it has been found to be invalid.
+ *
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberBadRequestException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberUnauthorizedException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberForbiddenException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberNotFoundException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberTooManyRequestsException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberInternalServerErrorException
+ */
+ public function getSmsInvalidPhoneNumber(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSmsInvalidPhoneNumber($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to remove “invalid” phone numbers from Braze’s invalid list.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sms.invalid_phone_numbers.remove` permission.
+ *
+ * This can be used to re-validate phone numbers after they have been marked as invalid.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `phone_number` | Required | Array of strings in e.164 format | An array of up to 50 phone numbers to modify. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * @var string $Content-Type
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveBadRequestException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveForbiddenException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveNotFoundException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveInternalServerErrorException
+ */
+ public function postSmsInvalidPhoneNumbersRemove(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostSmsInvalidPhoneNumbersRemove($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to get the subscription state of a user in a subscription group.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.status.get` permission.
+ *
+ * These groups will be available on the **Subscription Group** page. The response from this endpoint will include the external ID and either subscribed, unsubscribed, or unknown for the specific subscription group requested in the API call. This can be used to update the subscription group state in subsequent API calls or to be displayed on a hosted web page.
+ *
+ * \*Either `external_id` or `phone` are required. When both are submitted, only the external_id is used for querying and the phone number is applied to that user.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * All successful responses will return `subscribed`, `unsubscribed`, or `unknown` depending on status and user history with the subscription group.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "status": {
+ * "1": "Unsubscribed",
+ * "2": "Subscribed"
+ * },
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $subscription_group_id (Required) String
+ *
+ * The `id` of your subscription group
+ * @var string $external_id (Required*) String
+ *
+ * The `external_id` of the user (must include at least one and at most 50 `external_ids`).
+ *
+ * When both an `external_id` and `phone` are submitted, only the external_id(s) provided will be applied to the result query.
+ * @var string $phone (Required*) String in [E.164](https://en.wikipedia.org/wiki/E.164) format
+ *
+ * The phone number of the user (must include at least one phone number and at most 50 phone numbers).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSubscriptionStatusGetBadRequestException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetUnauthorizedException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetForbiddenException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetNotFoundException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetTooManyRequestsException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetInternalServerErrorException
+ */
+ public function getSubscriptionStatusGet(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSubscriptionStatusGet($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to list and get the subscription groups of a certain user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.groups.get` permission.
+ *
+ * If there are multiple users (multiple external IDs) who share the same email address, all users will be returned as a separate user (even if they have the same email address or subscription group).
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $external_id (Required*) String
+ *
+ * The `external_id` of the user (must include at least one and at most 50 `external_ids`)
+ * @var int $limit (Optional) Integer
+ *
+ * The limit on the maximum number of results returned. Default (and max) limit is 100.
+ * @var int $offset (Optional) Integer
+ *
+ * Number of templates to skip before returning the rest of the templates that fit the search criteria
+ * @var string $phone (Required*) String in [E.164](https://en.wikipedia.org/wiki/E.164) format
+ *
+ * The phone number of the user. Must include at least one phone number (with a max of 50).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetSubscriptionUserStatusBadRequestException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusUnauthorizedException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusForbiddenException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusNotFoundException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusTooManyRequestsException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusInternalServerErrorException
+ */
+ public function getSubscriptionUserStatus(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetSubscriptionUserStatus($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to batch update the subscription state of up to 50 users on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.status.set` permission.
+ *
+ * You can access a subscription group’s `subscription_group_id` by navigating to the **Subscription Group** page.
+ *
+ * Tip: When creating new users via the [/users/track](https://www.braze.com/docs/api/endpoints/user_data/post_user_track/) endpoint, you can set subscription groups within the user attributes object, which allows you to create a user and set the subscription group state in one API call.
+ *
+ * \*Only `external_id` or `phone` is accepted for SMS subscription groups.
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after January 6, 2022, we apply a rate limit of 5,000 requests per minute shared across the `/subscription/status/set` and `/v2/subscription/status/set` endpoint as documented in [API rate limits](http://localhost:4000/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `subscription_group_id` | Required | String | The `id` of your subscription group. |
+ * | `subscription_state` | Required | String | Available values are `unsubscribed` (not in subscription group) or `subscribed` (in subscription group). |
+ * | `external_id` | Required\* | Array of strings | The `external_id` of the user or users, may include up to 50 `id`s. |
+ * | `phone` | Required\* | String in [E.164](https://en.wikipedia.org/wiki/E.164) format | The phone number of the user, can be passed as an array of strings. Must include at least one phone number (with a max of 50). |
+ *
+ * ### Example successful response
+ *
+ * The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * Important: The endpoint only accepts the `email` or `phone` value, not both. If given both, you will receive this response: `{"message":"Either an email address or a phone number should be provided, but not both."}`
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostSubscriptionStatusSetBadRequestException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetUnauthorizedException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetForbiddenException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetNotFoundException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetTooManyRequestsException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetInternalServerErrorException
+ */
+ public function postSubscriptionStatusSet(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostSubscriptionStatusSet($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to batch update the subscription state of up to 50 users on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.status.set` permission.
+ *
+ * You can access a subscription group’s `subscription_group_id` by navigating to the **Subscriptions Group** page.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after January 6, 2022, we apply a rate limit of 5,000 requests per minute shared across the `/subscription/status/set` and `/v2/subscription/status/set` endpoint as documented in [API rate limits](http://localhost:4000/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `subscription_group_id` | Required | String | The `id` of your subscription group. |
+ * | `subscription_state` | Required | String | Available values are `unsubscribed` (not in subscription group) or `subscribed` (in subscription group). |
+ * | `external_ids` | Required\* | Array of strings | The `external_id` of the user or users, may include up to 50 `id`s. |
+ * | `phones` | Required\* | String in [E.164](https://en.wikipedia.org/wiki/E.164) format | The phone numbers of the user, can be passed as an array of strings. Must include at least one phone number (with a max of 50). |
+ *
+ * ### Example successful response
+ *
+ * Response: (status 201)
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetBadRequestException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetUnauthorizedException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetForbiddenException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetNotFoundException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetTooManyRequestsException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetInternalServerErrorException
+ */
+ public function postV2SubscriptionStatusSet(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostV2SubscriptionStatusSet($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to list your existing [Content Blocks](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/) information.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.list` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR_REST_API_KEY
+ * {
+ * "count": "integer",
+ * "content_blocks": [
+ * {
+ * "content_block_id": "string",
+ * "name": "string",
+ * "content_type": "html or text",
+ * "liquid_tag": "string",
+ * "inclusion_count" : "integer",
+ * "created_at": "time-in-iso",
+ * "last_edited": "time-in-iso",
+ * "tags" : "array of strings"
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Modified after time is invalid` | The provided date is not a valid or parsable date. Reformat this value as a string in ISO 8601 format (`yyyy-mm-ddThh:mm:ss.ffffff`). |
+ * | `Modified before time is invalid` | The provided date is not a valid or parsable date. Reformat this value as a string in ISO 8601 format (`yyyy-mm-ddThh:mm:ss.ffffff`). |
+ * | `Modified after time must be earlier than or the same as modified before time.` | Change the `modified_after` value to a time that is earlier than the `modified_before` time. |
+ * | `Content Block number limit is invalid` | The `limit` parameter must be an integer (positive number) greater than 0. |
+ * | `Content Block number limit must be greater than 0` | Change the `limit` parameter to an integer greater than 0. |
+ * | `Content Block number limit exceeds maximum of 1000` | Change the `limit` parameter to an integer less than 1000. |
+ * | `Offset is invalid` | The `offset` parameter must be an integer greater than 0. |
+ * | Offset must be greater than 0 | Change the `offset` parameter to an integer greater than 0. |
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $modified_after (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only content blocks updated at or after the given time.
+ * @var string $modified_before (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only content blocks updated at or before the given time.
+ * @var int $limit (Optional) Positive Number
+ *
+ * Maximum number of content blocks to retrieve. Default to 100 if not provided, with a maximum acceptable value of 1000.
+ * @var int $offset (Optional) Positive Number
+ *
+ * Number of content blocks to skip before returning rest of the templates that fit the search criteria.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetContentBlocksListBadRequestException
+ * @throws \Braze\Exception\GetContentBlocksListUnauthorizedException
+ * @throws \Braze\Exception\GetContentBlocksListForbiddenException
+ * @throws \Braze\Exception\GetContentBlocksListNotFoundException
+ * @throws \Braze\Exception\GetContentBlocksListTooManyRequestsException
+ * @throws \Braze\Exception\GetContentBlocksListInternalServerErrorException
+ */
+ public function getContentBlocksList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetContentBlocksList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to call information for your existing [Content Blocks](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.info` permission.
+ *
+ **Note:** If you are using our [older navigation](https://www.braze.com/docs/navigation), `content_block_id`can be found at ****Developer Console** > **API Settings****.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR_REST_API_KEY
+ * {
+ * "content_block_id": "string",
+ * "name": "string",
+ * "content": "string",
+ * "description": "string",
+ * "content_type": "html or text",
+ * "tags": "array of strings",
+ * "created_at": "time-in-iso",
+ * "last_edited": "time-in-iso",
+ * "inclusion_count" : "integer",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Content Block ID cannot be blank` | Make sure that a Content Block is listed in your request and is encapsulated in quotes (`""`). |
+ * | `Content Block ID is invalid for this App Group` | This Content Block doesn't exist or is in a different company account or app group. |
+ * | `Content Block has been deleted—content not available` | This Content Block, though it may have existed earlier, has been deleted. |
+ * | `Include Inclusion Data—error` | This parameter only accepts boolean values (true or false). Make sure the value for `include_inclusion_data` is not encapsulated in quotes (`""`), which causes the value to be sent as a string instead. See [request parameters](#request-parameters) for details. |
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $content_block_id (Required) String
+ *
+ * The content block identifier.
+ *
+ * You can find this by either listing content block information through an API call or going to **Settings > Setup and Testing > API Keys**, then scrolling to the bottom and searching for your content block API identifier.
+ * @var bool $include_inclusion_data (Optional) Boolean
+ *
+ * When set to `true`, the API returns back the Message Variation API identifier of campaigns and Canvases where this content block is included, to be used in subsequent calls. The results exclude archived or deleted Campaigns or Canvases.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetContentBlocksInfoBadRequestException
+ * @throws \Braze\Exception\GetContentBlocksInfoUnauthorizedException
+ * @throws \Braze\Exception\GetContentBlocksInfoForbiddenException
+ * @throws \Braze\Exception\GetContentBlocksInfoNotFoundException
+ * @throws \Braze\Exception\GetContentBlocksInfoTooManyRequestsException
+ * @throws \Braze\Exception\GetContentBlocksInfoInternalServerErrorException
+ */
+ public function getContentBlocksInfo(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetContentBlocksInfo($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create a [Content Block](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.create` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `name` | Required | String | Name of the content block. Must be less than 100 characters. |
+ * | `description` | Optional | String | Description of the content block. Must be less than 250 characters. |
+ * | `content` | Required | String | HTML or text content within the Content Block. |
+ * | `state` | Optional | String | Choose `active` or `draft`. Defaults to `active` if not specified. |
+ * | `tags` | Optional | Array of strings | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "content_block_id": (string) Your newly generated block id,
+ * "liquid_tag": (string) The generated block tag from the Content Block name,
+ * "created_at": (string) The time the Content Block was created in ISO 8601,
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Content cannot be blank` | |
+ * | `Content must be a string` | Make sure your content is encapsulated in quotes (`""`). |
+ * | `Content must be smaller than 50kb` | The content in your Content Block must be less than 50kb total. |
+ * | `Content contains malformed liquid` | The Liquid provided is not valid or parsable. Try again with valid Liquid or reach out to support. |
+ * | `Content Block cannot be referenced within itself` | |
+ * | `Content Block description cannot be blank` | |
+ * | `Content Block description must be a string` | Make sure your Content Block description is encapsulated in quotes (`""`). |
+ * | `Content Block description must be shorter than 250 characters` | |
+ * | `Content Block name cannot be blank` | |
+ * | `Content Block name must be shorter than 100 characters` | |
+ * | `Content Block name can only contain alphanumeric characters` | Content Block names can include any of the following characters: the letters (capitalized or lowercase) `A` through `Z`, the numbers `0` through `9`, dashes `-`, and underscores `_`. It cannot contain non-alphanumeric characters like emojis, `!`, `@`, `~`, `&`, and other "special" characters. |
+ * | `Content Block with this name already exists` | Try a different name. |
+ * | `Content Block state must be either active or draft` | |
+ * | `Tags must be an array` | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | `All tags must be strings` | Make sure your tags are encapsulated in quotes (`""`). |
+ * | `Some tags could not be found` | To add a tag when creating a Content Block, the tag must already exist in Braze. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostContentBlocksCreateBadRequestException
+ * @throws \Braze\Exception\PostContentBlocksCreateUnauthorizedException
+ * @throws \Braze\Exception\PostContentBlocksCreateForbiddenException
+ * @throws \Braze\Exception\PostContentBlocksCreateNotFoundException
+ * @throws \Braze\Exception\PostContentBlocksCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostContentBlocksCreateInternalServerErrorException
+ */
+ public function postContentBlocksCreate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostContentBlocksCreate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update a [Content Block](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.update` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/)
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `content_block_id` | Required | String | Your content block's API identifier. |
+ * | `name` | Required | String | Name of the content block. Must be less than 100 characters. |
+ * | `description` | Optional | String | Description of the content block. Must be less than 250 characters. |
+ * | `content` | Required | String | HTML or text content within content blocks. |
+ * | `state` | Optional | String | Choose `active` or `draft`. Defaults to `active` if not specified. |
+ * | `tags` | Optional | Array of strings | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "content_block_id": (string) Your newly generated block id,
+ * "liquid_tag": (string) The generated block tag from the Content Block name,
+ * "created_at": (string) The time the Content Block was created in ISO 8601,
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Content cannot be blank` | |
+ * | `Content must be a string` | Make sure your content is encapsulated in quotes (`""`). |
+ * | `Content must be smaller than 50kb` | The content in your Content Block must be less than 50kb total. |
+ * | `Content contains malformed liquid` | The Liquid provided is not valid or parsable. Try again with valid Liquid or reach out to support. |
+ * | `Content Block cannot be referenced within itself` | |
+ * | `Content Block description cannot be blank` | |
+ * | `Content Block description must be a string` | Make sure your Content Block description is encapsulated in quotes (`""`). |
+ * | `Content Block description must be shorter than 250 characters` | |
+ * | `Content Block name cannot be blank` | |
+ * | `Content Block name must be shorter than 100 characters` | |
+ * | `Content Block name can only contain alphanumeric characters` | Content Block names can include any of the following characters: the letters (capitalized or lowercase) `A` through `Z`, the numbers `0` through `9`, dashes `-`, and underscores `_`. It cannot contain non-alphanumeric characters like emojis, `!`, `@`, `~`, `&`, and other "special" characters. |
+ * | `Content Block with this name already exists` | Try a different name. |
+ * | `Content Block name cannot be updated for active Content Blocks` | |
+ * | `Content Block state must be either active or draft` | |
+ * | `Active Content Block can not be updated to Draft. Create a new Content Block.` | |
+ * | `Tags must be an array` | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | `All tags must be strings` | Make sure your tags are encapsulated in quotes (`""`). |
+ * | `Some tags could not be found` | To add a tag when creating a Content Block, the tag must already exist in Braze. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostContentBlocksUpdateBadRequestException
+ * @throws \Braze\Exception\PostContentBlocksUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostContentBlocksUpdateForbiddenException
+ * @throws \Braze\Exception\PostContentBlocksUpdateNotFoundException
+ * @throws \Braze\Exception\PostContentBlocksUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostContentBlocksUpdateInternalServerErrorException
+ */
+ public function postContentBlocksUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostContentBlocksUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to get a list of available templates in your Braze account.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.list` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * > **Important:** Templates built using the Drag & Drop Editor for email are not provided in this response.
+ *
+ *
+ * ``` json
+ * {
+ * "count": number of templates returned
+ * "templates": [template with the following properties]:
+ * "email_template_id": (string) your email template's API Identifier,
+ * "template_name": (string) the name of your email template,
+ * "created_at": (string, in ISO 8601),
+ * "updated_at": (string, in ISO 8601),
+ * "tags": (array of strings) tags appended to the template
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $modified_after (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only templates updated at or after the given time.
+ * @var string $modified_before (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only templates updated at or before the given time.
+ * @var int $limit (Optional) Positive Number
+ *
+ * Maximum number of templates to retrieve. Default to 100 if not provided, with a maximum acceptable value of 1000.
+ * @var int $offset (Optional) Positive Number
+ *
+ * Number of templates to skip before returning rest of the templates that fit the search criteria.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetTemplatesEmailListBadRequestException
+ * @throws \Braze\Exception\GetTemplatesEmailListUnauthorizedException
+ * @throws \Braze\Exception\GetTemplatesEmailListForbiddenException
+ * @throws \Braze\Exception\GetTemplatesEmailListNotFoundException
+ * @throws \Braze\Exception\GetTemplatesEmailListTooManyRequestsException
+ * @throws \Braze\Exception\GetTemplatesEmailListInternalServerErrorException
+ */
+ public function getTemplatesEmailList(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetTemplatesEmailList($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to get information on your email templates.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.info` permission.
+ *
+ * > **Important:** Templates built using the drag-and-drop editor for email are not accepted.
+ *
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "email_template_id": (string) your email template's API Identifier,
+ * "template_name": (string) the name of your email template,
+ * "description": (string) email template description,
+ * "subject": (string) the email template subject line,
+ * "preheader": (optional, string) the email preheader used to generate previews in some clients),
+ * "body": (optional, string) the email template body that may include HTML,
+ * "plaintext_body": (optional, string) a plaintext version of the email template body,
+ * "should_inline_css": (optional, boolean) whether there is inline CSS in the body of the template - defaults to the css inlining value for the App Group,
+ * "tags": (string) tag names,
+ * "created_at": (string, in ISO 8601),
+ * "updated_at": (string, in ISO 8601)
+ * }
+ *
+ * ```
+ *
+ * Images in this response will show in the `body` variable as HTML.
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $email_template_id (Required) String
+ *
+ * See [email template's API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\GetTemplatesEmailInfoBadRequestException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoUnauthorizedException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoForbiddenException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoNotFoundException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoTooManyRequestsException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoInternalServerErrorException
+ */
+ public function getTemplatesEmailInfo(array $queryParameters = [], array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\GetTemplatesEmailInfo($queryParameters, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to create email templates on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.create` permission.
+ *
+ * These templates will be available on the **Templates & Media** page. The response from this endpoint will include a field for `email_template_id`, which can be used to update the template in subsequent API calls.
+ *
+ * Users’ email subscription status can be updated and retrieved via Braze using a RESTful API. You can use the API to set up bi-directional sync between Braze and other email systems or your own database. All API requests are made over HTTPS.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `template_name` | Required | String | Name of your email template. |
+ * | `subject` | Required | String | Email template subject line. |
+ * | `body` | Required | String | Email template body that may include HTML. |
+ * | `plaintext_body` | Optional | String | A plaintext version of the email template body. |
+ * | `preheader` | Optional | String | Email preheader used to generate previews in some clients. |
+ * | `tags` | Optional | String | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ * | `should_inline_css` | Optional | Boolean | Enables or disables the `inline_css` feature per template. If not provided, Braze will use the default setting for the app group. One of `true` or `false` is expected. |
+ *
+ * ### Possible errors
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps, if applicable.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | Template name is required | Enter a template name. |
+ * | Tags must be an array | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | All tags must be strings | Make sure your tags are encapsulated in quotes (`""`). |
+ * | Some tags could not be found | To add a tag when creating an email template, the tag must already exist in Braze. |
+ * | Email must have valid Content Block names | The email contains Content Blocks that don't exist in this environment. |
+ * | Invalid value for `should_inline_css`. One of `true` or `false` was expected | This parameter only accepts boolean values (true or false). Make sure the value for `should_inline_css` is not encapsulated in quotes (`""`), which causes the value to be sent as a string instead. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostTemplatesEmailCreateBadRequestException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateUnauthorizedException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateForbiddenException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateNotFoundException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateInternalServerErrorException
+ */
+ public function postTemplatesEmailCreate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostTemplatesEmailCreate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to rename your users’ external IDs.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.external_ids.rename` permission.
+ *
+ * You can send up to 50 rename objects per request. You will need to create a new [API key](https://www.braze.com/docs/api/api_key/) with permissions for this endpoint.
+ *
+ * This endpoint sets a new (primary) `external_id` for the user and deprecates their existing `external_id`. This means that the user can be identified by either `external_id` until the deprecated one is removed. Having multiple external IDs allows for a migration period so that older versions of your apps that use the previous external ID naming schema don't break.
+ *
+ * After your old naming schema is no longer in use, we highly recommend removing deprecated external IDs using the [`/users/external_ids/remove` endpoint](https://www.braze.com/docs/api/endpoints/user_data/external_id_migration/post_external_ids_remove).
+ *
+ * > **Warning:** Make sure to remove deprecated external IDs with the
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply a rate limit of 1,000 requests per minute to this endpoint, as documented in [API rate limits](http://braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_id_renames` | Required | Array of external ID rename objects | View request example and the following limitations for structure of external ID rename object |
+ *
+ * - The `current_external_id` must be the user’s primary ID, and cannot be a deprecated ID
+ * - The `new_external_id` must not already be in use as either a primary ID or a deprecated ID
+ * - The `current_external_id` and `new_external_id` cannot be the same
+ *
+ *
+ * ## Response
+ *
+ * The response will confirm all successful renames, as well as unsuccessful renames with any associated errors. Error messages in the `rename_errors` field will reference the index of the object in the array of the original request.
+ *
+ * ``` json
+ * {
+ * "message" : (string) status message,
+ * "external_ids" : (array of successful Rename Operations),
+ * "rename_errors": (array of any )
+ * }
+ *
+ * ```
+ *
+ * The `message` field will return `success` for any valid request. More specific errors are captured in the `rename_errors` array. The `message` field returns an error in the case of:
+ *
+ * - Invalid API key
+ * - Empty `external_id_renames` array
+ * - `external_id_renames` array with more than 50 objects
+ * - Rate limit hit (>1,000 requests/minute)
+ *
+ *
+ * ## Frequently Asked Questions
+ *
+ **Does this impact MAU?**
+ * No, since the number of users will stay the same, they’ll just have a new `external_id`.
+ *
+ **Does user behavior change historically?**
+ * No, since the user is still the same user, and all their historical behavior is still connected to them.
+ *
+ **Can it be run on dev/staging app groups?**
+ * Yes. In fact, we highly recommend running a test migration on a staging or development app group, and ensuring everything has gone smoothly before executing on production data.
+ *
+ **Does this consume data points?**
+ * This feature does not cost data points.
+ *
+ **What is the recommended deprecation period?**
+ * We have no hard limit on how long you can keep deprecated external IDs around, but we highly recommend removing them once there is no longer a need to reference users by the deprecated ID.
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameBadRequestException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameForbiddenException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameNotFoundException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameInternalServerErrorException
+ */
+ public function postUsersExternalIdsRename(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersExternalIdsRename($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to remove your users' old deprecated external IDs.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.external_ids.remove` permission.
+ *
+ * You can send up to 50 external IDs per request. You will need to create a new [API key](https://www.braze.com/docs/api/api_key/) with permissions for this endpoint.
+ *
+ * > **Warning:** This endpoint completely removes the deprecated ID and cannot be undone. Using this endpoint to remove deprecated \`external_ids\` that are still associated with users in your system can permanently prevent you from finding those users' data.
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply a rate limit of 1,000 requests per minute to this endpoint, as documented in [API rate limits](http://braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_ids` | Required | Array of strings | External identifiers for the users to remove |
+ *
+ * > Important: Only deprecated IDs can be removed; attempting to remove a primary external ID will result in an error.
+ *
+ *
+ * ## Response
+ *
+ * The response will confirm all successful removals, as well as unsuccessful removals with the associated errors. Error messages in the `removal_errors` field will reference the index in the array of the original request.
+ *
+ * ``` json
+ * {
+ * "message" : (string) status message,
+ * "removed_ids" : (array of successful Remove Operations),
+ * "removal_errors": (array of any )
+ * }
+ *
+ * ```
+ *
+ * The `message` field will return `success` for any valid request. More specific errors are captured in the `removal_errors` array. The `message` field returns an error in the case of:
+ *
+ * - Invalid API key
+ * - Empty `external_ids` array
+ * - `external_ids` array with more than 50 items
+ * - Rate limit hit (>1,000 requests/minute)
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveBadRequestException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveForbiddenException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveNotFoundException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveInternalServerErrorException
+ */
+ public function postUsersExternalIdsRemove(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersExternalIdsRemove($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to update existing user aliases.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.alias.update` permission.
+ *
+ * Up to 50 user aliases may be specified per request.
+ *
+ * This endpoint does not guarantee the sequence of `alias_updates` objects being updated.
+ *
+ * Updating a user alias requires `alias_label`, `old_alias_name`, and `new_alias_name` to be included in the update user alias object. If there is no user alias associated with the `alias_label` and `old_alias_name`, no alias will be updated. If the given `alias_label` and `old_alias_name` is found, then the `old_alias_name` will be updated to the `new_alias_name`.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete`, `/users/identify`, `/users/merge`, and `/users/alias/update` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `alias_updates` | Required | Array of update user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/).
For more information on `old_alias_name`, `new_alias_name`, and `alias_label`, refer to [User aliases](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases). |
+ *
+ * ### Endpoint request body with update user alias object specification
+ *
+ * ``` json
+ * {
+ * "alias_label" : (required, string),
+ * "old_alias_name" : (required, string),
+ * "new_alias_name" : (required, string)
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersAliasUpdateBadRequestException
+ * @throws \Braze\Exception\PostUsersAliasUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostUsersAliasUpdateForbiddenException
+ * @throws \Braze\Exception\PostUsersAliasUpdateNotFoundException
+ * @throws \Braze\Exception\PostUsersAliasUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersAliasUpdateInternalServerErrorException
+ */
+ public function postUsersAliasUpdate(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersAliasUpdate($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to add new user aliases for existing identified users, or to create new unidentified users.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.alias.new` permission.
+ *
+ * Up to 50 user aliases may be specified per request.
+ *
+ **Adding a user alias for an existing user** requires an `external_id` to be included in the new user alias object. If the `external_id` is present in the object but there is no user with that `external_id`, the alias will not be added to any users. If an `external_id` is not present, a user will still be created but will need to be identified later. You can do this using the "Identifying Users" and the `users/identify` endpoint.
+ *
+ **Creating a new alias-only user** requires the `external_id` to be omitted from the new user alias object. Once the user is created, use the `/users/track` endpoint to associate the alias-only user with attributes, events, and purchases, and the `/users/identify` endpoint to identify the user with an `external_id`.
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete` and `/users/identify` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `user_aliases` | Required | Array of new user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/).
For more information on `alias_name` and `alias_label`, check out our [User Aliases](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases) documentation. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersAliasNewBadRequestException
+ * @throws \Braze\Exception\PostUsersAliasNewUnauthorizedException
+ * @throws \Braze\Exception\PostUsersAliasNewForbiddenException
+ * @throws \Braze\Exception\PostUsersAliasNewNotFoundException
+ * @throws \Braze\Exception\PostUsersAliasNewTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersAliasNewInternalServerErrorException
+ */
+ public function postUsersAliasNew(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersAliasNew($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to delete any user profile by specifying a known user identifier.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.delete` permission.
+ *
+ * Up to 50 `external_ids`, `user_aliases`, or `braze_ids` can be included in a single request. Only one of `external_ids`, `user_aliases`, or `braze_ids` can be included in a single request.
+ *
+ * > **Important:** Deleting user profiles cannot be undone. It will permanently remove users which may cause discrepancies in your data. Learn more about what happens when you [delete a user profile via API](https://braze.com/docs/help/help_articles/api/delete_user/) in our Help documentation.
+ *
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/alias/new` and `/users/identify` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameter
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_ids` | Optional | Array of strings | External identifiers for the users to delete. |
+ * | `user_aliases` | Optional | Array of user alias object | [User aliases](https://www.braze.com/docs/api/objects_filters/user_alias_object/) for the users to delete. |
+ * | `braze_ids` | Optional | Array of strings | Braze user identifiers for the users to delete. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersDeleteBadRequestException
+ * @throws \Braze\Exception\PostUsersDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostUsersDeleteForbiddenException
+ * @throws \Braze\Exception\PostUsersDeleteNotFoundException
+ * @throws \Braze\Exception\PostUsersDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersDeleteInternalServerErrorException
+ */
+ public function postUsersDelete(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersDelete($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to identify an unidentified (alias-only) user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.identify` permission.
+ *
+ * Calling `/users/identify` combines the alias-only profile with the identified profile and removes the alias-only profile.
+ *
+ * Identifying a user requires an `external_id` to be included in the `aliases_to_identify` object. If there is no user with that `external_id`, the `external_id` will simply be added to the aliased user's record, and the user will be considered identified. You can add up to 50 user aliases per request.
+ *
+ * Subsequently, you can associate multiple additional user aliases with a single `external_id`.
+ *
+ * - When these subsequent associations are made with the `merge_behavior` field set to `none`, only the push tokens and message history associated with the user alias are retained; any attributes, events, or purchases will be "orphaned" and not available on the identified user. One workaround is to export the aliased user's data before identification using the [`/users/export/ids` endpoint](https://www.braze.com/docs/api/endpoints/export/user_data/post_users_identifier/), then re-associate the attributes, events, and purchases with the identified user.
+ * - When associations are made with the `merge_behavior` field set to `merge`, this endpoint will merge [specific fields](#merge) found on the anonymous user to the identified user.
+ *
+ *
+ * > Note: To prevent unexpected loss of data when identifying users, we highly recommend that you first refer to [data collection best practices](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/best_practices/#capturing-user-data-when-alias-only-user-info-is-already-present) to learn about capturing user data when alias-only user info is already present.
+ *
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete` and `/users/alias/new` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `aliases_to_identify` | Required | Array of aliases to identify object | See [alias to identify object](https://www.braze.com/docs/api/objects_filters/aliases_to_identify/) and [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/). |
+ * | `merge_behavior` | Optional | String | One of `none` or `merge` is expected. |
+ *
+ * #### Merge_behavior field
+ *
+ * Setting the `merge_behavior` field to `merge` sets the endpoint to merge any of the following fields found **exclusively** on the anonymous user to the identified user.
+ *
+ * - First name
+ * - Last name
+ * - Email
+ * - Gender
+ * - Date of birth
+ * - Phone number
+ * - Time zone
+ * - Home city
+ * - Country
+ * - Language
+ * - Session count (the sum of sessions from both profiles)
+ * - Date of first session (Braze will pick the earlier date of the two dates)
+ * - Date of last session (Braze will pick the later date of the two dates)
+ * - Custom attributes
+ * - Custom event and purchase event data (excluding event properties)
+ * - Custom event and purchase event properties for "X times in Y days" segmentation (where X<=50 and Y<=30)
+ * - Segmentable custom events summary
+ * - Event count (the sum from both profiles)
+ * - Event first occurred (Braze will pick the earlier date of the two dates)
+ * - Event last occurred (Braze will pick the later date of the two dates)
+ * - In-app purchase total in cents (the sum from both profiles)
+ * - Total number of purchases (the sum from both profiles)
+ * - Date of first purchase (Braze will pick the earlier date of the two dates)
+ * - Date of last purchase (Braze will pick the later date of the two dates)
+ * - App summaries
+ * - Last_X_at fields (Braze will update the fields if the orphaned profile fields are more recent)
+ * - Campaign summaries (Braze will pick the most recent date fields)
+ * - Workflow summaries (Braze will pick the most recent date fields)
+ * - Message and message engagement history
+ *
+ *
+ * Any of the following fields found on the anonymous user to the identified user:
+ *
+ * - Custom event and purchase event count and first date and last date timestamps
+ * - These merged fields will update "for X events in Y days" filters. For purchase events, these filters include "number of purchases in Y days" and "money spent in last Y days".
+ *
+ * Session data will only be merged if the app exists on both user profiles. For example, if our target user doesn't have an app summary for "ABCApp" but our original user does, the target user will have the "ABCApp" app summary on their profile after the merge.
+ *
+ * Setting the field to `none` will not merge any user data to the identified user profile.
+ *
+ * ### Aliases to Identify object specification
+ *
+ * ``` json
+ * {
+ * "external_id" : (required, string) see External User ID below,
+ * // external_ids for users that do not exist will return a non-fatal error.
+ * // See Server Responses for details.
+ * "user_alias" : {
+ * "alias_name" : (required, string),
+ * "alias_label" : (required, string)
+ * }
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersIdentifyBadRequestException
+ * @throws \Braze\Exception\PostUsersIdentifyUnauthorizedException
+ * @throws \Braze\Exception\PostUsersIdentifyForbiddenException
+ * @throws \Braze\Exception\PostUsersIdentifyNotFoundException
+ * @throws \Braze\Exception\PostUsersIdentifyTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersIdentifyInternalServerErrorException
+ */
+ public function postUsersIdentify(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersIdentify($requestBody, $headerParameters), $fetch);
+ }
+
+ /**
+ * > Use this endpoint to merge one user into another user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.merge` permission.
+ *
+ * Up to 50 merges may be specified per request. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete`, `/users/alias/new`, `/users/identify`, and `/users/alias/update` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `merge_updates` | Required | Array | An object array. Each object should contain an `identifier_to_merge` object and an `identifier_to_keep` object, which should each reference a user either by `external_id` or `user_alias`. Both users being merged must be identified using the same method. |
+ *
+ * ### Merge_updates behavior
+ *
+ * This endpoint will merge any of the following fields found exclusively on the original user to the target user.
+ *
+ * - First name
+ * - Last name
+ * - Email
+ * - Gender
+ * - Date of birth
+ * - Phone number
+ * - Time zone
+ * - Home city
+ * - Country
+ * - Language
+ * - Session count (the sum of sessions from both profiles)
+ * - Date of first session (Braze will pick the earlier date of the two dates)
+ * - Date of last session (Braze will pick the later date of the two dates)
+ * - Custom attributes
+ * - Custom event and purchase event data (excluding event properties)
+ * - Custom event and purchase event properties for "X times in Y days" segmentation (where X<=50 and Y<=30)
+ * - Segmentable custom events summary
+ * - Event count (the sum from both profiles)
+ * - Event first occurred (Braze will pick the earlier date of the two dates)
+ * - Event last occurred (Braze will pick the later date of the two dates)
+ * - In-app purchase total in cents (the sum from both profiles)
+ * - Total number of purchases (the sum from both profiles)
+ * - Date of first purchase (Braze will pick the earlier date of the two dates)
+ * - Date of last purchase (Braze will pick the later date of the two dates)
+ * - App summaries
+ * - Last_X_at fields (Braze will update the fields if the orphaned profile fields are more recent)
+ * - Campaign summaries (Braze will pick the most recent date fields)
+ * - Workflow summaries (Braze will pick the most recent date fields)
+ *
+ *
+ * Any of the following fields found on one user to the other user:
+ *
+ * - Custom event and purchase event count and first date and last date timestamps
+ * - These merged fields will update "for X events in Y days" filters. For purchase events, these filters include "number of purchases in Y days" and "money spent in last Y days".
+ *
+ * Session data will only be merged if the app exists on both user profiles. For example, if our target user doesn't have an app summary for "ABCApp" but our original user does, the target user will have the "ABCApp" app summary on their profile after the merge. Note that message and message engagement history aren't retained after both user profiles are merged.
+ *
+ * The endpoint does not guarantee the sequence of `merge_updates` objects being updated.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/users/merge' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "merge_updates": [
+ * {
+ * "identifier_to_merge": {
+ * "external_id": "old-user1"
+ * },
+ * "identifier_to_keep": {
+ * "external_id": "current-user1"
+ * }
+ * },
+ * {
+ * "identifier_to_merge": {
+ * "user_alias": {
+ * "alias_name": "old-user2@example.com",
+ * "alias_label": "email"
+ * }
+ * },
+ * "identifier_to_keep": {
+ * "user_alias": {
+ * "alias_name": "current-user2@example.com",
+ * "alias_label": "email"
+ * }
+ * }
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `202` and `400`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to Troubleshooting (below) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "message": "'merge_updates' must be an array of objects"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible error messages that may occur.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `'merge_updates' must be an array of objects` | Ensure that `merge_updates` is an array of objects. |
+ * | `a single request may not contain more than 50 merge updates` | You can only specify up to 50 merge updates in a single request. |
+ * | `identifiers must be objects with an 'external_id' property that is a string, or 'user_alias' property that is an object` | Check the identifiers in your request. |
+ * | `identifiers must be objects of the same type` | Ensure that the identifier object types match. |
+ * | `'merge_updates' must only have 'identifier_to_merge' and 'identifier_to_keep'` | Ensure that `merge_updates` only contains the two objects `identifier_to_merge` and `identifier_to_keep`. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ *
+ * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
+ *
+ * @return \Psr\Http\Message\ResponseInterface|null
+ *
+ * @throws \Braze\Exception\PostUsersMergeBadRequestException
+ * @throws \Braze\Exception\PostUsersMergeUnauthorizedException
+ * @throws \Braze\Exception\PostUsersMergeForbiddenException
+ * @throws \Braze\Exception\PostUsersMergeNotFoundException
+ * @throws \Braze\Exception\PostUsersMergeTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersMergeInternalServerErrorException
+ */
+ public function postUsersMerge(\stdClass $requestBody = null, array $headerParameters = [], string $fetch = self::FETCH_OBJECT)
+ {
+ return $this->executeEndpoint(new \Braze\Endpoint\PostUsersMerge($requestBody, $headerParameters), $fetch);
+ }
+
+ public static function create($httpClient = null, array $additionalPlugins = [], array $additionalNormalizers = [])
+ {
+ if (null === $httpClient) {
+ $httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
+ $plugins = [];
+ $uri = \Http\Discovery\Psr17FactoryDiscovery::findUrlFactory()->createUri('https://rest.iad-01.braze.com');
+ $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri);
+ if (count($additionalPlugins) > 0) {
+ $plugins = array_merge($plugins, $additionalPlugins);
+ }
+ $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
+ }
+ $requestFactory = \Http\Discovery\Psr17FactoryDiscovery::findRequestFactory();
+ $streamFactory = \Http\Discovery\Psr17FactoryDiscovery::findStreamFactory();
+ $normalizers = [new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \Braze\Normalizer\JaneObjectNormalizer()];
+ if (count($additionalNormalizers) > 0) {
+ $normalizers = array_merge($normalizers, $additionalNormalizers);
+ }
+ $serializer = new \Symfony\Component\Serializer\Serializer($normalizers, [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode(['json_decode_associative' => true]))]);
+
+ return new static($httpClient, $requestFactory, $serializer, $streamFactory);
+ }
+}
diff --git a/lib/Endpoint/DeleteCatalogByCatalogName.php b/lib/Endpoint/DeleteCatalogByCatalogName.php
new file mode 100644
index 0000000..208a174
--- /dev/null
+++ b/lib/Endpoint/DeleteCatalogByCatalogName.php
@@ -0,0 +1,164 @@
+ Use this endpoint to delete a catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `200` and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `404` could return the following response body. Refer to [Troubleshooting](https://www.braze.com/docs/api/endpoints/catalogs/catalog_management/synchronous/delete_catalog/#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "catalog-not-found",
+ * "message": "Could not find catalog",
+ * "parameters": [
+ * "catalog_name"
+ * ],
+ * "parameter_values": [
+ * "restaurants"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'DELETE';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}'], [$this->catalog_name], '/catalogs/{catalog_name}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameBadRequestException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameUnauthorizedException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameForbiddenException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameNotFoundException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameTooManyRequestsException
+ * @throws \Braze\Exception\DeleteCatalogByCatalogNameInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\DeleteCatalogByCatalogNameBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogByCatalogNameUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogByCatalogNameForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogByCatalogNameNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogByCatalogNameTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogByCatalogNameInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/DeleteCatalogsByCatalogNameItem.php b/lib/Endpoint/DeleteCatalogsByCatalogNameItem.php
new file mode 100644
index 0000000..48da8f1
--- /dev/null
+++ b/lib/Endpoint/DeleteCatalogsByCatalogNameItem.php
@@ -0,0 +1,190 @@
+ Use this endpoint to delete multiple items in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete_items` permission.
+ *
+ * Each request can support up to 50 items. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain an `id` referencing the items Braze should delete. Up to 50 item objects are allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {"id": "restaurant1"},
+ * {"id": "restaurant2"},
+ * {"id": "restaurant3"}
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "items-missing-ids",
+ * "message": "There are 1 item(s) that do not have ids",
+ * "parameters": [],
+ * "parameter_values": []
+ * }
+ * ],
+ * "message": "Invalid Request",
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `ids-too-large` | Item IDs can't be more than 250 characters. |
+ * | `ids-not-unique` | Check that the item IDs are unique in the request. |
+ * | `ids-not-strings` | Item IDs must be of type string. |
+ * | `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |
+ * | `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |
+ * | `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'DELETE';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}'], [$this->catalog_name], '/catalogs/{catalog_name}/items');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\DeleteCatalogsByCatalogNameItemBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/DeleteCatalogsByCatalogNameItemByItemId.php b/lib/Endpoint/DeleteCatalogsByCatalogNameItemByItemId.php
new file mode 100644
index 0000000..f4343c6
--- /dev/null
+++ b/lib/Endpoint/DeleteCatalogsByCatalogNameItemByItemId.php
@@ -0,0 +1,182 @@
+ Use this endpoint to delete an item in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete_item` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "item-not-found",
+ * "message": "Could not find item",
+ * "parameters": [
+ * "item_id"
+ * ],
+ * "parameter_values": [
+ * "restaurant34"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `item-not-found` | Check that the item to be deleted exists in your catalog. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, string $itemId, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->item_id = $itemId;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'DELETE';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}', '{item_id}'], [$this->catalog_name, $this->item_id], '/catalogs/{catalog_name}/items/{item_id}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\DeleteCatalogsByCatalogNameItemByItemIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteCatalogsByCatalogNameItemByItemIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/DeleteScimV2UserById.php b/lib/Endpoint/DeleteScimV2UserById.php
new file mode 100644
index 0000000..3581867
--- /dev/null
+++ b/lib/Endpoint/DeleteScimV2UserById.php
@@ -0,0 +1,142 @@
+ This endpoint allows you to permanently delete an existing dashboard user by specifying the resource `id` returned by the SCIM [`POST`](https://www.braze.com/docs/scim/post_create_user_account/) method.
+ *
+ * This is similar to deleting a user in the **Manage Users** section of the Braze dashboard. For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data type | Description |
+ * | --- | --- | --- | --- |
+ * | `id` | Required | String | The user’s resource ID. This parameter is returned by the `POST` `/scim/v2/Users/` or `GET` `/scim/v2/Users?filter=userName eq "[user@test.com](mailto:user@test.com)"` methods. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Response
+ *
+ * ### Example error response
+ *
+ * ``` json
+ * HTTP/1.1 204 Not Found
+ * Content-Type: text/html; charset=UTF-8
+ *
+ * ```
+ *
+ * If a developer with this ID doesn’t exist in Braze, the endpoint will respond with:
+ *
+ * ``` json
+ * HTTP/1.1 404 Not Found Content-Type: text/html; charset=UTF-8
+ * { "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"], "detail": "User not found", "status": 404 }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $id, array $headerParameters = [])
+ {
+ $this->id = $id;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'DELETE';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{id}'], [$this->id], '/scim/v2/Users/{id}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'X-Request-Origin', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('X-Request-Origin', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\DeleteScimV2UserByIdBadRequestException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdUnauthorizedException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdForbiddenException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdNotFoundException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdTooManyRequestsException
+ * @throws \Braze\Exception\DeleteScimV2UserByIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\DeleteScimV2UserByIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteScimV2UserByIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteScimV2UserByIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteScimV2UserByIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteScimV2UserByIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\DeleteScimV2UserByIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCampaignsDataSeries.php b/lib/Endpoint/GetCampaignsDataSeries.php
new file mode 100644
index 0000000..11d4834
--- /dev/null
+++ b/lib/Endpoint/GetCampaignsDataSeries.php
@@ -0,0 +1,311 @@
+ Use this endpoint to retrieve a daily series of various stats for a campaign over time.
+ *
+ * Data returned includes how many messages were sent, opened, clicked, or converted by messaging channel.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.data_series` permission.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `campaign_id` can be found at **Developer Console > API Settings**.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Responses
+ *
+ * ### Multichannel response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) date as ISO 8601 date,
+ * "messages" : {
+ * "ios_push" : [
+ * {
+ * "variation_name": "iOS_Push",
+ * "sent" : (int),
+ * "direct_opens" : (int),
+ * "total_opens" : (int),
+ * "bounces" : (int),
+ * "body_clicks" : (int)
+ * "revenue": 0,
+ * "unique_recipients": 1,
+ * "conversions": 0,
+ * "conversions_by_send_time": 0,
+ * "conversions1": 0,
+ * "conversions1_by_send_time": 0,
+ * "conversions2": 0,
+ * "conversions2_by_send_time": 0,
+ * "conversions3": 0,
+ * "conversions3_by_send_time": 0,
+ * "carousel_slide_[NUM]_[TITLE]_click": (optional, int),
+ * "notif_button_[NUM]_[TITLE]_click": (optional, int)
+ * }
+ * ],
+ * "android_push" : [
+ * {
+ * "sent" : (int),
+ * "direct_opens" : (int),
+ * "total_opens" : (int),
+ * "bounces" : (int),
+ * "body_clicks" : (int)
+ * }
+ * ],
+ * "webhook": [
+ * {
+ * "sent": (int),
+ * "errors": (int)
+ * }
+ * ],
+ * "email" : [
+ * {
+ * "sent": (int),
+ * "opens": (int),
+ * "unique_opens": (int),
+ * "clicks": (int),
+ * "unique_clicks": (int),
+ * "unsubscribes": (int),
+ * "bounces": (int),
+ * "delivered": (int),
+ * "reported_spam": (int)
+ * }
+ * ],
+ * "sms" : [
+ * {
+ * "sent": (int),
+ * "delivered": (int),
+ * "undelivered": (int),
+ * "delivery_failed": (int)
+ * }
+ * ]
+ * },
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3_by_send_time": (optional, int),
+ * "conversions": (int),
+ * "conversions1": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions3": (optional, int),
+ * "unique_recipients": (int),
+ * "revenue": (optional, float)
+ * },
+ * ...
+ * ],
+ * ...
+ * }
+ *
+ * ```
+ *
+ * ### Multivariate response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "data" : [
+ * {
+ * "time" : (string) date as ISO 8601 date,
+ * "conversions" : (int),
+ * "revenue": (float),
+ * "conversions_by_send_time": (int),
+ * "messages" : {
+ * "trigger_in_app_message": [{
+ * "variation_name": (optional, string),
+ * "impressions": (int),
+ * "clicks": (int),
+ * "first_button_clicks": (int),
+ * "second_button_clicks": (int),
+ * "revenue": (optional, float),,
+ * "unique_recipients": (int),
+ * "conversions": (optional, int),
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3": (optional, int),
+ * "conversions3_by_send_time": (optional, int)
+ * }, {
+ * "variation_name": (optional, string),
+ * "impressions": (int),
+ * "clicks": (int),
+ * "first_button_clicks": (int),
+ * "second_button_clicks": (int),
+ * "revenue": (optional, float),,
+ * "unique_recipients": (int),
+ * "conversions": (optional, int),
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3": (optional, int).
+ * "conversions3_by_send_time": (optional, int)
+ * }, {
+ * "variation_name": (optional, string),
+ * "revenue": (optional, float),,
+ * "unique_recipients": (int),
+ * "conversions": (optional, int),
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3": (optional, int),
+ * "conversions3_by_send_time": (optional, int),
+ * "enrolled": (optional, int)
+ * }]
+ * },
+ * "conversions_by_send_time": (optional, int),
+ * "conversions1_by_send_time": (optional, int),
+ * "conversions2_by_send_time": (optional, int),
+ * "conversions3_by_send_time": (optional, int),
+ * "conversions": (optional, int,
+ * "conversions1": (optional, int),
+ * "conversions2": (optional, int),
+ * "conversions3": (optional, int),
+ * "unique_recipients": (int),
+ * "revenue": (optional, float)
+ * }],
+ * ...
+ * }
+ *
+ * ```
+ *
+ * Possible message types are `email`, `in_app_message`, `webhook`, `android_push`, ios_push, `kindle_push`, `web_push`. All push message types will have the same statistics shown for `android_push`.
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $campaign_id (Required) String
+ *
+ * See [campaign API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `campaign_id` for API campaigns can be found at **Settings > Setup and Testing > API Keys** and the **Campaign Details** page within your dashboard, or you can use the [List campaigns endpoint](https://www.braze.com/docs/api/endpoints/export/campaigns/get_campaigns/).
+ * @var int $length (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['campaign_id', 'length', 'ending_at']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('campaign_id', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCampaignsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetCampaignsDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCampaignsDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCampaignsDetail.php b/lib/Endpoint/GetCampaignsDetail.php
new file mode 100644
index 0000000..7e21371
--- /dev/null
+++ b/lib/Endpoint/GetCampaignsDetail.php
@@ -0,0 +1,349 @@
+ Use this endpoint to retrieve relevant information on a specified campaign, which can be identified by the `campaign_id`.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaign.details` permission.
+ *
+ * If you want to retrieve Canvas data, refer to the [Canvas Details](https://www.braze.com/docs/api/endpoints/export/canvas/get_canvas_details/) endpoint.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `campaign_id` can be found at **Developer Console** > **API Settings**
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Responses
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "created_at" : (string) the date created as ISO 8601 date,
+ * "updated_at" : (string) the date last updated as ISO 8601 date,
+ * "archived": (boolean) whether this campaign is archived,
+ * "draft": (boolean) whether this campaign is a draft,
+ * "name" : (string) the campaign name,
+ * "description" : (string) the campaign description,
+ * "schedule_type" : (string) the type of scheduling action,
+ * "channels" : (array) the list of channels to send via,
+ * "first_sent" : (string) the date and hour of first sent as ISO 8601 date,
+ * "last_sent" : (string) the date and hour of last sent as ISO 8601 date,
+ * "tags" : (array) the tag names associated with the campaign,
+ * "messages": {
+ * "message_variation_id": (string) { // <=This is the actual id
+ * "channel": (string) the channel type of the message, must be either email, ios_push, webhook, content_card, in-app_message, or sms,
+ * "name": (string) the name of the message in the dashboard (eg., "Variation 1")
+ * ... channel-specific fields for this message, see the following messages section ...
+ * }
+ * },
+ * "conversion_behaviors": (array) the conversion event behaviors assigned to the campaign, see the following conversions behavior section.
+ * }
+ *
+ * ```
+ *
+ * ### Messages
+ *
+ * The `messages` response will contain information about each message. The following includes example message responses for each channel:
+ *
+ * #### Push channels
+ *
+ * ``` json
+ * {
+ * "channel": (string) description of the channel, such as "ios_push" or "android_push"
+ * "alert": (string) alert body text,
+ * "extras": (hash) any key value pairs provided
+ * }
+ *
+ * ```
+ *
+ * #### Email channel
+ *
+ * ``` json
+ * {
+ * "channel": "email",
+ * "subject": (string) subject,
+ * "body": (string) HTML body,
+ * "from": (string) from address and display name,
+ * "reply_to": (string) reply-to for message, if different than "from" address,
+ * "title": (string) name of the email,
+ * "extras": (hash) any key value pairs provided
+ * }
+ *
+ * ```
+ *
+ * #### In-app message channel
+ *
+ * ``` json
+ * {
+ * "type": (string) description of in-app message type, such as "survey",
+ * "data": {
+ * "pages": [
+ * {
+ * "header":
+ * {
+ * "text":(string) display text for the header of the survey,
+ * }
+ * "choices": [
+ * {
+ * "choice_id": (string) choice identifier,
+ * "text": (string) display text,
+ * "custom_attribute_key": (string) custom attribute key,
+ * "custom_attribute_value": (sting) custom attribute value,
+ * "deleted": (boolean) deleted from live campaign,
+ * },
+ * ...
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * #### Content Card channel
+ *
+ * ``` json
+ * {
+ * "channel": "content_cards",
+ * "name": (string) name of variant,
+ * "extras": (hash) any key value pairs provided; only present if at least one key-value pair has been set
+ * }
+ *
+ * ```
+ *
+ * #### Webhook channel
+ *
+ * ``` json
+ * {
+ * "channel": "webhook",
+ * "url": (string) url for webhook,
+ * "body": (string) payload body,
+ * "type": (string) body content type,
+ * "headers": (hash) specified request headers,
+ * "method": (string) HTTP method (e.g., "POST" or "GET"),
+ * }
+ *
+ * ```
+ *
+ * #### SMS channel
+ *
+ * ``` json
+ * {
+ * "channel": "sms",
+ * "body": (string) payload body,
+ * "from": (string) list of numbers associated with the subscription group,
+ * "subscription_group_id": (string) API id of the subscription group targeted in the SMS message
+ * }
+ *
+ * ```
+ *
+ * #### Control Messages
+ *
+ * ``` json
+ * {
+ * "channel": (string) description of the channel that the control is for,
+ * "type": "control"
+ * }
+ *
+ * ```
+ *
+ * ### Conversion Behaviors
+ *
+ * The `conversion_behaviors` array will contain information about each conversion event behavior set for the campaign. These behaviors are in order as set by the campaign. For example, Conversion Event A will be the first item in the array, Conversion Event B will be second, etc. The following lists example conversion event behavior responses:
+ *
+ * #### Clicks email
+ *
+ * ``` json
+ * {
+ * "type": "Clicks Email",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours
+ * }
+ *
+ * ```
+ *
+ * #### Opens email
+ *
+ * ``` json
+ * {
+ * "type": "Opens Email",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours
+ * }
+ *
+ * ```
+ *
+ * #### Makes purchase (any purchase)
+ *
+ * ``` json
+ * {
+ * "type": "Makes Any Purchase",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours
+ * }
+ *
+ * ```
+ *
+ * #### Makes purchase (specific product)
+ *
+ * ``` json
+ * {
+ * "type": "Makes Specific Purchase",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "product": (string) name of the product, i.e. - "Feline Body Armor"
+ * }
+ *
+ * ```
+ *
+ * #### Performs custom event
+ *
+ * ``` json
+ * {
+ * "type": "Performs Custom Event",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "custom_event_name": (string) name of the event, i.e. - "Used Feline Body Armor"
+ * }
+ *
+ * ```
+ *
+ * #### Upgrades app
+ *
+ * ``` json
+ * {
+ * "type": "Upgrades App",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "app_ids": (array|null) array of app ids, i.e. - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
+ * }
+ *
+ * ```
+ *
+ * #### Uses app
+ *
+ * ``` json
+ * {
+ * "type": "Starts Session",
+ * "window": (integer) number of seconds during which the user can convert on this event, i.e. - 86400, which is 24 hours,
+ * "app_ids": (array|null) array of app ids, i.e. - ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $campaign_id (Required) String
+ *
+ * See [campaign API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `campaign_id` for API campaigns can be found on the **Settings > Setup and Testing > API Keys** and the campaign details page within your dashboard, or you can use the [Campaign List Endpoint](https://www.braze.com/docs/api/endpoints/export/campaigns/get_campaign_analytics/#campaign-list-endpoint).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/details';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['campaign_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('campaign_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCampaignsDetailBadRequestException
+ * @throws \Braze\Exception\GetCampaignsDetailUnauthorizedException
+ * @throws \Braze\Exception\GetCampaignsDetailForbiddenException
+ * @throws \Braze\Exception\GetCampaignsDetailNotFoundException
+ * @throws \Braze\Exception\GetCampaignsDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetCampaignsDetailInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCampaignsDetailBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDetailUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDetailForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDetailNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDetailTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsDetailInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCampaignsList.php b/lib/Endpoint/GetCampaignsList.php
new file mode 100644
index 0000000..b6f8b67
--- /dev/null
+++ b/lib/Endpoint/GetCampaignsList.php
@@ -0,0 +1,167 @@
+ Use this endpoint to export a list of campaigns, each of which will include its name, campaign API identifier, whether it is an API campaign, and tags associated with the campaign.
+ *
+ * The campaigns are returned in groups of 100 sorted by time of creation (oldest to newest by default).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.list` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Campaign list endpoint API response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "campaigns" : [
+ * {
+ * "id" : (string) Campaign API Identifier,
+ * "last_edited": (ISO 8601 string) the last edited time for the message
+ * "name" : (string) campaign name,
+ * "is_api_campaign" : (boolean) whether the campaign is an API Campaign,
+ * "tags" : (array) tag names associated with the campaign
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of campaigns to return, defaults to 0 (returns the first set of up to 100)
+ * @var bool $include_archived (Optional) Boolean
+ *
+ * Whether or not to include archived campaigns, defaults to false
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * @var string $last_edit.time[gt] (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Filters the results and only returns campaigns that were edited greater than the time provided till now. Format is `yyyy-MM-DDTHH:mm:ss`.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['page', 'include_archived', 'sort_direction', 'last_edit.time[gt]']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('page', ['int']);
+ $optionsResolver->addAllowedTypes('include_archived', ['bool']);
+ $optionsResolver->addAllowedTypes('sort_direction', ['string']);
+ $optionsResolver->addAllowedTypes('last_edit.time[gt]', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCampaignsListBadRequestException
+ * @throws \Braze\Exception\GetCampaignsListUnauthorizedException
+ * @throws \Braze\Exception\GetCampaignsListForbiddenException
+ * @throws \Braze\Exception\GetCampaignsListNotFoundException
+ * @throws \Braze\Exception\GetCampaignsListTooManyRequestsException
+ * @throws \Braze\Exception\GetCampaignsListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCampaignsListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCampaignsListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCanvasDataSeries.php b/lib/Endpoint/GetCanvasDataSeries.php
new file mode 100644
index 0000000..d3e33de
--- /dev/null
+++ b/lib/Endpoint/GetCanvasDataSeries.php
@@ -0,0 +1,214 @@
+ Use this endpoint to export time series data for a Canvas.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "data": {
+ * "name": (string) Canvas name,
+ * "stats": [
+ * {
+ * "time": (string) date as ISO 8601 date,
+ * "total_stats": {
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "entries": (int)
+ * },
+ * "variant_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for variant) {
+ * "name": (string) name of variant,
+ * "revenue": (int),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "entries": (int)
+ * },
+ * ... (more variants)
+ * },
+ * "step_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for step) {
+ * "name": (string) name of step,
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "messages": {
+ * "email": [
+ * {
+ * "sent": (int),
+ * "opens": (int),
+ * "unique_opens": (int),
+ * "clicks": (int),
+ * ... (more stats)
+ * }
+ * ],
+ * ... (more channels)
+ * }
+ * },
+ * ... (more steps)
+ * }
+ * },
+ * ... (more stats by time)
+ * ]
+ * },
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $canvas_id (Required) String
+ *
+ * See [Canvas API Identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var string $ending_at (Required) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data export should end. Defaults to time of the request.
+ * @var string $starting_at (Optional*) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data export should begin.
+ *
+ *Either `length` or `starting_at` is required.
+ * @var int $length (Optional*) String
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 14 (inclusive).
+ *
+ *Either `length` or `starting_at` is required.
+ * @var bool $include_variant_breakdown (Optional) Boolean
+ *
+ * Whether or not to include variant stats (defaults to false)
+ * @var bool $include_step_breakdown (Optional) Boolean
+ *
+ * Whether or not to include step stats (defaults to false)
+ * @var bool $include_deleted_step_data (Optional) Boolean
+ *
+ * Whether or not to include step stats for deleted steps (defaults to false).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['canvas_id', 'ending_at', 'starting_at', 'length', 'include_variant_breakdown', 'include_step_breakdown', 'include_deleted_step_data']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('canvas_id', ['string']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('starting_at', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('include_variant_breakdown', ['bool']);
+ $optionsResolver->addAllowedTypes('include_step_breakdown', ['bool']);
+ $optionsResolver->addAllowedTypes('include_deleted_step_data', ['bool']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCanvasDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetCanvasDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetCanvasDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetCanvasDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCanvasDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCanvasDataSummary.php b/lib/Endpoint/GetCanvasDataSummary.php
new file mode 100644
index 0000000..cace793
--- /dev/null
+++ b/lib/Endpoint/GetCanvasDataSummary.php
@@ -0,0 +1,206 @@
+ Use this endpoint to export rollups of time series data for a Canvas, providing a concise summary of a Canvas’ results.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.data_summary` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "data": {
+ * "name": (string) Canvas name,
+ * "total_stats": {
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "entries": (int)
+ * },
+ * "variant_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for variant) {
+ * "name": (string) name of variant,
+ * "revenue": (float),
+ * "conversions": (int),
+ * "entries": (int)
+ * },
+ * ... (more variants)
+ * },
+ * "step_stats": (optional) {
+ * "00000000-0000-0000-0000-0000000000000": (API identifier for step) {
+ * "name": (string) name of step,
+ * "revenue": (float),
+ * "conversions": (int),
+ * "conversions_by_entry_time": (int),
+ * "messages": {
+ * "android_push": (name of channel) [
+ * {
+ * "sent": (int),
+ * "opens": (int),
+ * "influenced_opens": (int),
+ * "bounces": (int)
+ * ... (more stats for channel)
+ * }
+ * ],
+ * ... (more channels)
+ * }
+ * },
+ * ... (more steps)
+ * }
+ * },
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://desktop.postman.com/?desktopVersion=9.19.0&userId=16580579&teamId=409325).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $canvas_id (Required) String
+ *
+ * See [Canvas API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var string $ending_at (Required) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ * Date on which the data export should end. Defaults to time of the request
+ * @var string $starting_at (Optional*) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data export should begin.
+ *
+ *Either `length` or `starting_at` is required.
+ * @var int $length (Optional*) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series. Must be between 1 and 14 (inclusive).
+ *
+ *Either `length` or `starting_at` is required.
+ * @var bool $include_variant_breakdown (Optional) Boolean
+ *
+ * Whether or not to include variant stats (defaults to false)
+ * @var bool $include_step_breakdown (Optional) Boolean
+ *
+ * Whether or not to include step stats (defaults to false)
+ * @var bool $include_deleted_step_data (Optional) Boolean
+ *
+ * Whether or not to include step stats for deleted steps (defaults to false).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/data_summary';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['canvas_id', 'ending_at', 'starting_at', 'length', 'include_variant_breakdown', 'include_step_breakdown', 'include_deleted_step_data']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('canvas_id', ['string']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('starting_at', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('include_variant_breakdown', ['bool']);
+ $optionsResolver->addAllowedTypes('include_step_breakdown', ['bool']);
+ $optionsResolver->addAllowedTypes('include_deleted_step_data', ['bool']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCanvasDataSummaryBadRequestException
+ * @throws \Braze\Exception\GetCanvasDataSummaryUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasDataSummaryForbiddenException
+ * @throws \Braze\Exception\GetCanvasDataSummaryNotFoundException
+ * @throws \Braze\Exception\GetCanvasDataSummaryTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasDataSummaryInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCanvasDataSummaryBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSummaryUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSummaryForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSummaryNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSummaryTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDataSummaryInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCanvasDetail.php b/lib/Endpoint/GetCanvasDetail.php
new file mode 100644
index 0000000..3df8283
--- /dev/null
+++ b/lib/Endpoint/GetCanvasDetail.php
@@ -0,0 +1,177 @@
+ Use this endpoint to export metadata about a Canvas, such as the name, time created, current status, and more.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.details` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * Note: All Canvas steps have a next_paths field, which is an array of `{name, next_step_id}` data. For full steps and Message steps, the `next_step_ids` field will be present, but will not contain data for other Canvas Flow steps.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "created_at": (string) date created as ISO 8601 date,
+ * "updated_at": (string) date updated as ISO 8601 date,
+ * "name": (string) Canvas name,
+ * "description": (string) Canvas description,
+ * "archived": (boolean) whether this Canvas is archived,
+ * "draft": (boolean) whether this Canvas is a draft,
+ * "schedule_type": (string) type of scheduling action,
+ * "first_entry": (string) date of first entry as ISO 8601 date,
+ * "last_entry": (string) date of last entry as ISO 8601 date,
+ * "channels": (array of strings) step channels used with Canvas,
+ * "variants": [
+ * {
+ * "name": (string) name of variant,
+ * "id": (string) API identifier of the variant,
+ * "first_step_ids": (array of strings) API identifiers for first steps in variant,
+ * "first_step_id": (string) API identifier of first step in variant (deprecated in November 2017, only included if the variant has only one first step)
+ * },
+ * ... (more variations)
+ * ],
+ * "tags": (array of strings) tag names associated with the Canvas,
+ * "steps": [
+ * {
+ * "name": (string) name of step,
+ * "id": (string) API identifier of the step,
+ * "next_step_ids": (array of strings) API identifiers of steps following step,
+ * "channels": (array of strings) channels used in step,
+ * "messages": {
+ * "message_variation_id": (string) { // <=This is the actual id
+ * "channel": (string) channel type of the message (eg., "email"),
+ * ... channel-specific fields for this message, see Campaign Details Endpoint API Response for example message responses ...
+ * }
+ * }
+ * },
+ * ... (more steps)
+ * ],
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://desktop.postman.com/?desktopVersion=9.19.0&userId=16580579&teamId=409325).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $canvas_id (Required) String
+ *
+ * See [Canvas API Identifier](https://www.braze.com/docs/api/identifier_types/)
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/details';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['canvas_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('canvas_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCanvasDetailBadRequestException
+ * @throws \Braze\Exception\GetCanvasDetailUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasDetailForbiddenException
+ * @throws \Braze\Exception\GetCanvasDetailNotFoundException
+ * @throws \Braze\Exception\GetCanvasDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasDetailInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCanvasDetailBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDetailUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDetailForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDetailNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDetailTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasDetailInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCanvasList.php b/lib/Endpoint/GetCanvasList.php
new file mode 100644
index 0000000..d95b8bb
--- /dev/null
+++ b/lib/Endpoint/GetCanvasList.php
@@ -0,0 +1,168 @@
+ Use this endpoint to export a list of Canvases, including the name, Canvas API identifier and associated tags.
+ *
+ * Canvases are returned in groups of 100 sorted by time of creation (oldest to newest by default).
+ *
+ * Archived Canvases will not be included in the API response unless the `include_archived` field is specified. Canvases that are stopped but not archived, however, will be returned by default.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.list` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "canvases" : [
+ * {
+ * "id" : (string) Canvas API Identifier,
+ * "last_edited": (ISO 8601 string) the last edited time for the message,
+ * "name" : (string) Canvas name,
+ * "tags" : (array) tag names associated with the Canvas,
+ * },
+ * ... (more Canvases)
+ * ],
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://desktop.postman.com/?desktopVersion=9.19.0&userId=16580579&teamId=409325).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of Canvases to return, defaults to `0` (returns the first set of up to 100)
+ * @var bool $include_archived (Optional) Boolean
+ *
+ * Whether or not to include archived Canvases, defaults to `false`
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * @var string $last_edit.time[gt] (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Filters the results and only returns Canvases that were edited greater than the time provided till now. Format is `yyyy-MM-DDTHH:mm:ss`.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['page', 'include_archived', 'sort_direction', 'last_edit.time[gt]']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('page', ['int']);
+ $optionsResolver->addAllowedTypes('include_archived', ['bool']);
+ $optionsResolver->addAllowedTypes('sort_direction', ['string']);
+ $optionsResolver->addAllowedTypes('last_edit.time[gt]', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCanvasListBadRequestException
+ * @throws \Braze\Exception\GetCanvasListUnauthorizedException
+ * @throws \Braze\Exception\GetCanvasListForbiddenException
+ * @throws \Braze\Exception\GetCanvasListNotFoundException
+ * @throws \Braze\Exception\GetCanvasListTooManyRequestsException
+ * @throws \Braze\Exception\GetCanvasListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCanvasListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCanvasListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCatalog.php b/lib/Endpoint/GetCatalog.php
new file mode 100644
index 0000000..72630f8
--- /dev/null
+++ b/lib/Endpoint/GetCatalog.php
@@ -0,0 +1,202 @@
+ Use this endpoint to return a list of catalogs in a workspace.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.get` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path and request parameters
+ *
+ * There are no path or request parameters for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "catalogs": [
+ * {
+ * "description": "My Restaurants",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Name",
+ * "type": "string"
+ * },
+ * {
+ * "name": "City",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Cuisine",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Rating",
+ * "type": "number"
+ * },
+ * {
+ * "name": "Loyalty_Program",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "Created_At",
+ * "type": "time"
+ * }
+ * ],
+ * "name": "restaurants",
+ * "num_items": 10,
+ * "updated_at": "2022-11-02T20:04:06.879+00:00"
+ * },
+ * {
+ * "description": "My Catalog",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "string_field",
+ * "type": "string"
+ * },
+ * {
+ * "name": "number_field",
+ * "type": "number"
+ * },
+ * {
+ * "name": "boolean_field",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "time_field",
+ * "type": "time"
+ * },
+ * ],
+ * "name": "my_catalog",
+ * "num_items": 3,
+ * "updated_at": "2022-11-02T09:03:19.967+00:00"
+ * },
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $headerParameters = [])
+ {
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/catalogs';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCatalogBadRequestException
+ * @throws \Braze\Exception\GetCatalogUnauthorizedException
+ * @throws \Braze\Exception\GetCatalogForbiddenException
+ * @throws \Braze\Exception\GetCatalogNotFoundException
+ * @throws \Braze\Exception\GetCatalogTooManyRequestsException
+ * @throws \Braze\Exception\GetCatalogInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCatalogBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCatalogsByCatalogNameItem.php b/lib/Endpoint/GetCatalogsByCatalogNameItem.php
new file mode 100644
index 0000000..2eabd27
--- /dev/null
+++ b/lib/Endpoint/GetCatalogsByCatalogNameItem.php
@@ -0,0 +1,231 @@
+ Use this endpoint to return multiple catalog items and their content.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.get_items` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Query parameters
+ *
+ * Note that each call to this endpoint will return 50 items. For a catalog with more than 50 items, use the `Link` header to retrieve the data on the next page as shown in the following example response.
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `cursor` | Optional | String | Determines the pagination of the catalog items. |
+ *
+ * ## Example requests
+ *
+ * ### Without cursor
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ### With cursor
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items?cursor=c2tpcDow' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response header and body.
+ *
+ * {% alert note %}
+ * The `Link` header won't exist if the catalog has less than or equal to 50 items. For calls without a cursor, `prev` will not show. When looking at the last page of items, `next` will not show.
+ * {% endalert %}
+ *
+ * ```
+ * Link: ; rel="prev",; rel="next"
+ *
+ * ```
+ *
+ * ``` json
+ * {
+ * "items": [
+ * {
+ * "id": "restaurant1",
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Open_Time": "2022-11-02T09:03:19.967Z"
+ * },
+ * {
+ * "id": "restaurant2",
+ * "Name": "Restaurant2",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 10,
+ * "Loyalty_Program": true,
+ * "Open_Time": "2022-11-02T09:03:19.967Z"
+ * },
+ * {
+ * "id": "restaurant3",
+ * "Name": "Restaurant3",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": false,
+ * "Open_Time": "2022-11-02T09:03:19.967Z"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-cursor",
+ * "message": "'cursor' is not valid",
+ * "parameters": [
+ * "cursor"
+ * ],
+ * "parameter_values": [
+ * "bad-cursor"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `invalid-cursor` | Check that your `cursor` is valid. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}'], [$this->catalog_name], '/catalogs/{catalog_name}/items');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCatalogsByCatalogNameItemBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetCatalogsByCatalogNameItemByItemId.php b/lib/Endpoint/GetCatalogsByCatalogNameItemByItemId.php
new file mode 100644
index 0000000..0f46d7a
--- /dev/null
+++ b/lib/Endpoint/GetCatalogsByCatalogNameItemByItemId.php
@@ -0,0 +1,192 @@
+ Use this endpoint to return a catalog item and its content.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.get_item` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `200` and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "items": [
+ * {
+ * "id": "restaurant3",
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Open_Time": "2022-11-01T09:03:19.967Z"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `404` could return the following response. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "item-not-found",
+ * "message": "Could not find item",
+ * "parameters": [
+ * "item_id"
+ * ],
+ * "parameter_values": [
+ * "restaurant34"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps, if applicable.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `item-not-found` | Check that the item is in the catalog. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, string $itemId, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->item_id = $itemId;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}', '{item_id}'], [$this->catalog_name, $this->item_id], '/catalogs/{catalog_name}/items/{item_id}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetCatalogsByCatalogNameItemByItemIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetCatalogsByCatalogNameItemByItemIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetContentBlocksInfo.php b/lib/Endpoint/GetContentBlocksInfo.php
new file mode 100644
index 0000000..7250195
--- /dev/null
+++ b/lib/Endpoint/GetContentBlocksInfo.php
@@ -0,0 +1,166 @@
+ Use this endpoint to call information for your existing [Content Blocks](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.info` permission.
+ *
+ **Note:** If you are using our [older navigation](https://www.braze.com/docs/navigation), `content_block_id`can be found at ****Developer Console** > **API Settings****.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR_REST_API_KEY
+ * {
+ * "content_block_id": "string",
+ * "name": "string",
+ * "content": "string",
+ * "description": "string",
+ * "content_type": "html or text",
+ * "tags": "array of strings",
+ * "created_at": "time-in-iso",
+ * "last_edited": "time-in-iso",
+ * "inclusion_count" : "integer",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Content Block ID cannot be blank` | Make sure that a Content Block is listed in your request and is encapsulated in quotes (`""`). |
+ * | `Content Block ID is invalid for this App Group` | This Content Block doesn't exist or is in a different company account or app group. |
+ * | `Content Block has been deleted—content not available` | This Content Block, though it may have existed earlier, has been deleted. |
+ * | `Include Inclusion Data—error` | This parameter only accepts boolean values (true or false). Make sure the value for `include_inclusion_data` is not encapsulated in quotes (`""`), which causes the value to be sent as a string instead. See [request parameters](#request-parameters) for details. |
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $content_block_id (Required) String
+ *
+ * The content block identifier.
+ *
+ * You can find this by either listing content block information through an API call or going to **Settings > Setup and Testing > API Keys**, then scrolling to the bottom and searching for your content block API identifier.
+ * @var bool $include_inclusion_data (Optional) Boolean
+ *
+ * When set to `true`, the API returns back the Message Variation API identifier of campaigns and Canvases where this content block is included, to be used in subsequent calls. The results exclude archived or deleted Campaigns or Canvases.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/content_blocks/info';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['content_block_id', 'include_inclusion_data']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('content_block_id', ['string']);
+ $optionsResolver->addAllowedTypes('include_inclusion_data', ['bool']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetContentBlocksInfoBadRequestException
+ * @throws \Braze\Exception\GetContentBlocksInfoUnauthorizedException
+ * @throws \Braze\Exception\GetContentBlocksInfoForbiddenException
+ * @throws \Braze\Exception\GetContentBlocksInfoNotFoundException
+ * @throws \Braze\Exception\GetContentBlocksInfoTooManyRequestsException
+ * @throws \Braze\Exception\GetContentBlocksInfoInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetContentBlocksInfoBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksInfoUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksInfoForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksInfoNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksInfoTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksInfoInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetContentBlocksList.php b/lib/Endpoint/GetContentBlocksList.php
new file mode 100644
index 0000000..12bb011
--- /dev/null
+++ b/lib/Endpoint/GetContentBlocksList.php
@@ -0,0 +1,177 @@
+ Use this endpoint to list your existing [Content Blocks](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/) information.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.list` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR_REST_API_KEY
+ * {
+ * "count": "integer",
+ * "content_blocks": [
+ * {
+ * "content_block_id": "string",
+ * "name": "string",
+ * "content_type": "html or text",
+ * "liquid_tag": "string",
+ * "inclusion_count" : "integer",
+ * "created_at": "time-in-iso",
+ * "last_edited": "time-in-iso",
+ * "tags" : "array of strings"
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Modified after time is invalid` | The provided date is not a valid or parsable date. Reformat this value as a string in ISO 8601 format (`yyyy-mm-ddThh:mm:ss.ffffff`). |
+ * | `Modified before time is invalid` | The provided date is not a valid or parsable date. Reformat this value as a string in ISO 8601 format (`yyyy-mm-ddThh:mm:ss.ffffff`). |
+ * | `Modified after time must be earlier than or the same as modified before time.` | Change the `modified_after` value to a time that is earlier than the `modified_before` time. |
+ * | `Content Block number limit is invalid` | The `limit` parameter must be an integer (positive number) greater than 0. |
+ * | `Content Block number limit must be greater than 0` | Change the `limit` parameter to an integer greater than 0. |
+ * | `Content Block number limit exceeds maximum of 1000` | Change the `limit` parameter to an integer less than 1000. |
+ * | `Offset is invalid` | The `offset` parameter must be an integer greater than 0. |
+ * | Offset must be greater than 0 | Change the `offset` parameter to an integer greater than 0. |
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $modified_after (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only content blocks updated at or after the given time.
+ * @var string $modified_before (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only content blocks updated at or before the given time.
+ * @var int $limit (Optional) Positive Number
+ *
+ * Maximum number of content blocks to retrieve. Default to 100 if not provided, with a maximum acceptable value of 1000.
+ * @var int $offset (Optional) Positive Number
+ *
+ * Number of content blocks to skip before returning rest of the templates that fit the search criteria.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/content_blocks/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['modified_after', 'modified_before', 'limit', 'offset']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('modified_after', ['string']);
+ $optionsResolver->addAllowedTypes('modified_before', ['string']);
+ $optionsResolver->addAllowedTypes('limit', ['int']);
+ $optionsResolver->addAllowedTypes('offset', ['int']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetContentBlocksListBadRequestException
+ * @throws \Braze\Exception\GetContentBlocksListUnauthorizedException
+ * @throws \Braze\Exception\GetContentBlocksListForbiddenException
+ * @throws \Braze\Exception\GetContentBlocksListNotFoundException
+ * @throws \Braze\Exception\GetContentBlocksListTooManyRequestsException
+ * @throws \Braze\Exception\GetContentBlocksListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetContentBlocksListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetContentBlocksListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetEmailHardBounce.php b/lib/Endpoint/GetEmailHardBounce.php
new file mode 100644
index 0000000..9014d0e
--- /dev/null
+++ b/lib/Endpoint/GetEmailHardBounce.php
@@ -0,0 +1,188 @@
+ Use this endpoint to pull a list of email addresses that have “hard bounced” your email messages within a certain time frame.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.hard_bounces` permission.
+ *
+ **Note:** You must provide an `end_date`, as well as either an `email` or a `start_date`. If you provide all three, `start_date`, `end_date`, and an `email`, we prioritize the emails given and disregard the date range.
+ *
+ * If your date range has more than `limit` number of hard bounces, you will need to make multiple API calls, each time increasing the `offset` until a call returns either fewer than `limit` or zero results.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/email/hard_bounces?start_date=2019-01-01&end_date=2019-02-01&limit=100&offset=1&email=example@braze.com' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * Entries are listed in descending order.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "emails": [
+ * {
+ * "email": "example1@braze.com",
+ * "hard_bounced_at": "2016-08-25 15:24:32 +0000"
+ * },
+ * {
+ * "email": "example2@braze.com",
+ * "hard_bounced_at": "2016-08-24 17:41:58 +0000"
+ * },
+ * {
+ * "email": "example3@braze.com",
+ * "hard_bounced_at": "2016-08-24 12:01:13 +0000"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $start_date (Optional*) String in YYYY-MM-DD format
+ *
+ * Start date of the range to retrieve hard bounces, must be earlier than `end_date`. This is treated as midnight in UTC time by the API.
+ *
+ *You must provide either an `email` or a `start_date`, and an `end_date`.
+ * @var string $end_date (Optional*) String in YYYY-MM-DD format
+ *
+ * String in YYYY-MM-DD format. End date of the range to retrieve hard bounces. This is treated as midnight in UTC time by the API.
+ *
+ *You must provide either an `email` or a `start_date`, and an `end_date`.
+ * @var int $limit (Optional) Integer
+ *
+ * Optional field to limit the number of results returned. Defaults to 100, maximum is 500.
+ * @var int $offset (Optional) Integer
+ *
+ * Optional beginning point in the list to retrieve from
+ * @var string $email (Optional*) String
+ *
+ * If provided, we will return whether or not the user has hard bounced.
+ *
+ *You must provide either an `email` or a `start_date`, and an `end_date`.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/hard_bounces';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['start_date', 'end_date', 'limit', 'offset', 'email']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('start_date', ['string']);
+ $optionsResolver->addAllowedTypes('end_date', ['string']);
+ $optionsResolver->addAllowedTypes('limit', ['int']);
+ $optionsResolver->addAllowedTypes('offset', ['int']);
+ $optionsResolver->addAllowedTypes('email', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetEmailHardBounceBadRequestException
+ * @throws \Braze\Exception\GetEmailHardBounceUnauthorizedException
+ * @throws \Braze\Exception\GetEmailHardBounceForbiddenException
+ * @throws \Braze\Exception\GetEmailHardBounceNotFoundException
+ * @throws \Braze\Exception\GetEmailHardBounceTooManyRequestsException
+ * @throws \Braze\Exception\GetEmailHardBounceInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetEmailHardBounceBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailHardBounceUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailHardBounceForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailHardBounceNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailHardBounceTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailHardBounceInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetEmailUnsubscribe.php b/lib/Endpoint/GetEmailUnsubscribe.php
new file mode 100644
index 0000000..8ac71e9
--- /dev/null
+++ b/lib/Endpoint/GetEmailUnsubscribe.php
@@ -0,0 +1,188 @@
+ Use this endpoint to return emails that have unsubscribed during the time period from `start_date` to `end_date`.
+ *
+ * You can use this endpoint to set up a bi-directional sync between Braze and other email systems or your own database.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.unsubscribe` permission.
+ *
+ **Note:** You must provide an `end_date`, as well as either an `email` or a `start_date`.
+ *
+ * If your date range has more than `limit` number of unsubscribes, you will need to make multiple API calls, each time increasing the `offset` until a call returns either fewer than `limit` or zero results.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/email/unsubscribes?start_date=2020-01-01&end_date=2020-02-01&limit=1&offset=1&sort_direction=desc&email=example@braze.com' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * Entries are listed in descending order.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "emails": [
+ * {
+ * "email": "example1@braze.com",
+ * "unsubscribed_at": "2016-08-25 15:24:32 +0000"
+ * },
+ * {
+ * "email": "example2@braze.com",
+ * "unsubscribed_at": "2016-08-24 17:41:58 +0000"
+ * },
+ * {
+ * "email": "example3@braze.com",
+ * "unsubscribed_at": "2016-08-24 12:01:13 +0000"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $start_date (Optional*) String in YYYY-MM-DD format
+ *
+ * Start date of the range to retrieve unsubscribes, must be earlier than end_date. This is treated as midnight in UTC time by the API.
+ * @var string $end_date (Optional*) String in YYYY-MM-DD format
+ *
+ * End date of the range to retrieve unsubscribes. This is treated as midnight in UTC time by the API.
+ * @var int $limit (Optional) Integer
+ *
+ * Optional field to limit the number of results returned. Limit must be greater than 1. Defaults to 100, maximum is 500.
+ * @var int $offset (Optional) Integer
+ *
+ * Optional beginning point in the list to retrieve from
+ * @var string $sort_direction (Optional) String
+ *
+ * Pass in the value `asc` to sort unsubscribes from oldest to newest. Pass in `desc` to sort from newest to oldest. If sort_direction is not included, the default order is newest to oldest.
+ * @var string $email (Optional*) String
+ *
+ * If provided, we will return whether or not the user has unsubscribed.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/unsubscribes';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['start_date', 'end_date', 'limit', 'offset', 'sort_direction', 'email']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('start_date', ['string']);
+ $optionsResolver->addAllowedTypes('end_date', ['string']);
+ $optionsResolver->addAllowedTypes('limit', ['int']);
+ $optionsResolver->addAllowedTypes('offset', ['int']);
+ $optionsResolver->addAllowedTypes('sort_direction', ['string']);
+ $optionsResolver->addAllowedTypes('email', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetEmailUnsubscribeBadRequestException
+ * @throws \Braze\Exception\GetEmailUnsubscribeUnauthorizedException
+ * @throws \Braze\Exception\GetEmailUnsubscribeForbiddenException
+ * @throws \Braze\Exception\GetEmailUnsubscribeNotFoundException
+ * @throws \Braze\Exception\GetEmailUnsubscribeTooManyRequestsException
+ * @throws \Braze\Exception\GetEmailUnsubscribeInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetEmailUnsubscribeBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailUnsubscribeUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailUnsubscribeForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailUnsubscribeNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailUnsubscribeTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEmailUnsubscribeInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetEventsDataSeries.php b/lib/Endpoint/GetEventsDataSeries.php
new file mode 100644
index 0000000..eac8422
--- /dev/null
+++ b/lib/Endpoint/GetEventsDataSeries.php
@@ -0,0 +1,173 @@
+ Use this endpoint to retrieve a series of the number of occurrences of a custom event in your app over a designated time period.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `app_id` can be found at**Developer Console** > **API Settings**
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `events.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
+ * "count" : (int)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ### Fatal error response codes
+ *
+ * For status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/docs/api/errors/#fatal-errors).
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $event (Required) String
+ *
+ * The name of the custom event for which to return analytics
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of units (days or hours) before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $unit (Optional) String
+ *
+ * Unit of time between data points - can be `day` or `hour`, defaults to `day`
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys** to limit analytics to a specific app
+ * @var string $segment_id (Optional) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/). Segment ID indicating the analytics-enabled segment for which event analytics should be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/events/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['event', 'length', 'unit', 'ending_at', 'app_id', 'segment_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('event', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('unit', ['string']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+ $optionsResolver->addAllowedTypes('segment_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetEventsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetEventsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetEventsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetEventsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetEventsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetEventsDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetEventsDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetEventsList.php b/lib/Endpoint/GetEventsList.php
new file mode 100644
index 0000000..e086d80
--- /dev/null
+++ b/lib/Endpoint/GetEventsList.php
@@ -0,0 +1,150 @@
+ Use this endpoint to export a list of custom events that have been recorded for your app. The event names are returned in groups of 250, sorted alphabetically.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `events.list` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/purchases/product_list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "events" : [
+ * "Event A", (string) the event name,
+ * "Event B", (string) the event name,
+ * "Event C", (string) the event name,
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ### Fatal error response codes
+ *
+ * For status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/docs/api/errors/#fatal-errors).
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of event names to return, defaults to 0 (returns the first set of up to 250).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/events/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['page']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('page', ['int']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetEventsListBadRequestException
+ * @throws \Braze\Exception\GetEventsListUnauthorizedException
+ * @throws \Braze\Exception\GetEventsListForbiddenException
+ * @throws \Braze\Exception\GetEventsListNotFoundException
+ * @throws \Braze\Exception\GetEventsListTooManyRequestsException
+ * @throws \Braze\Exception\GetEventsListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetEventsListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetEventsListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetFeedDataSeries.php b/lib/Endpoint/GetFeedDataSeries.php
new file mode 100644
index 0000000..b1fa5f3
--- /dev/null
+++ b/lib/Endpoint/GetFeedDataSeries.php
@@ -0,0 +1,167 @@
+ Use this endpoint to retrieve a daily series of engagement stats for a card over time.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), \`card_id\` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `feed.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
+ * "clicks" : (int) the number of clicks,
+ * "impressions" : (int) the number of impressions,
+ * "unique_clicks" : (int) the number of unique clicks,
+ * "unique_impressions" : (int) the number of unique impressions
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $card_id (Required) String
+ *
+ * See [Card API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `card_id` for a given card can be found in the **Settings > Setup and Testing > API Keys** page and on the card details page within your dashboard, or you can use the [News Feed List Endpoint](https://www.braze.com/docs/api/endpoints/export/news_feed/get_news_feed_cards/).
+ * @var int $length (Required) Integer
+ *
+ * Max number of units (days or hours) before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $unit (Optional) String
+ *
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ *
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/feed/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['card_id', 'length', 'unit', 'ending_at']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('card_id', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('unit', ['string']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetFeedDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetFeedDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetFeedDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetFeedDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetFeedDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetFeedDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetFeedDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetFeedDetail.php b/lib/Endpoint/GetFeedDetail.php
new file mode 100644
index 0000000..9d9c411
--- /dev/null
+++ b/lib/Endpoint/GetFeedDetail.php
@@ -0,0 +1,156 @@
+ Use this endpoint to retrieve relevant information on a card, which can be identified by the `card_id`.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `card_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `feed.details` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) The status of the export, returns 'success' when completed without errors,
+ * "created_at" : (string) Date created as ISO 8601 date,
+ * "updated_at" : (string) Date last updated as ISO 8601 date,
+ * "name" : (string) Card name,
+ * "publish_at" : (string) Date card was published as ISO 8601 date,
+ * "end_at" : (string) Date card will stop displaying for users as ISO 8601 date,
+ * "tags" : (array) Tag names associated with the card,
+ * "title" : (string) Title of the card,
+ * "image_url" : (string) Image URL used by this card,
+ * "extras" : (dictionary) Dictionary containing key-value pair data attached to this card,
+ * "description" : (string) Description text used by this card,
+ * "archived": (boolean) whether this Card is archived,
+ * "draft": (boolean) whether this Card is a draft,
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $card_id (Required) String
+ *
+ * See [Card API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `card_id` for a given card can be found in the **Settings > Setup and Testing > API Keys** page and on the card details page within your dashboard, or you can use the [News Feed List Endpoint](https://www.braze.com/docs/api/endpoints/export/news_feed/get_news_feed_cards/).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/feed/details';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['card_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('card_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetFeedDetailBadRequestException
+ * @throws \Braze\Exception\GetFeedDetailUnauthorizedException
+ * @throws \Braze\Exception\GetFeedDetailForbiddenException
+ * @throws \Braze\Exception\GetFeedDetailNotFoundException
+ * @throws \Braze\Exception\GetFeedDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetFeedDetailInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetFeedDetailBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDetailUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDetailForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDetailNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDetailTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedDetailInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetFeedList.php b/lib/Endpoint/GetFeedList.php
new file mode 100644
index 0000000..cda1ebe
--- /dev/null
+++ b/lib/Endpoint/GetFeedList.php
@@ -0,0 +1,162 @@
+ Use this endpoint to export a list of News Feed cards, each of which will include its name and card API identifier.
+ *
+ * The cards are returned in groups of 100 sorted by time of creation (oldest to newest by default).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `feed.list` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "cards" : [
+ * {
+ * "id" : (string) Card API Identifier,
+ * "type" : (string) type of the card - NewsItem (classic cards), CaptionedImage, Banner or DevPick (cross-promotional cards),
+ * "title" : (string) title of the card,
+ * "tags" : (array) tag names associated with the card
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of cards to return, defaults to 0 (returns the first set of up to 100)
+ * @var bool $include_archived (Optional) Boolean
+ *
+ * Whether or not to include archived cards, defaults to false
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/feed/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['page', 'include_archived', 'sort_direction']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('page', ['int']);
+ $optionsResolver->addAllowedTypes('include_archived', ['bool']);
+ $optionsResolver->addAllowedTypes('sort_direction', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetFeedListBadRequestException
+ * @throws \Braze\Exception\GetFeedListUnauthorizedException
+ * @throws \Braze\Exception\GetFeedListForbiddenException
+ * @throws \Braze\Exception\GetFeedListNotFoundException
+ * @throws \Braze\Exception\GetFeedListTooManyRequestsException
+ * @throws \Braze\Exception\GetFeedListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetFeedListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetFeedListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetKpiDauDataSeries.php b/lib/Endpoint/GetKpiDauDataSeries.php
new file mode 100644
index 0000000..603138a
--- /dev/null
+++ b/lib/Endpoint/GetKpiDauDataSeries.php
@@ -0,0 +1,156 @@
+ Use this endpoint to retrieve a daily series of the total number of unique active users on each date.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), API Keys can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.dau.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "dau" : (int) the number of daily active users
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/kpi/dau/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['length', 'ending_at', 'app_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetKpiDauDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiDauDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetKpiDauDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiDauDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiDauDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiDauDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiDauDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiDauDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetKpiMauDataSeries.php b/lib/Endpoint/GetKpiMauDataSeries.php
new file mode 100644
index 0000000..c0a5fca
--- /dev/null
+++ b/lib/Endpoint/GetKpiMauDataSeries.php
@@ -0,0 +1,157 @@
+ Use this endpoint to retrieve a daily series of the total number of unique active users over a 30-day rolling window.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), API Keys can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.mau.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "mau" : (int) the number of monthly active users
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/kpi/mau/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['length', 'ending_at', 'app_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetKpiMauDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiMauDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetKpiMauDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiMauDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiMauDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiMauDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiMauDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiMauDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetKpiNewUsersDataSeries.php b/lib/Endpoint/GetKpiNewUsersDataSeries.php
new file mode 100644
index 0000000..f811357
--- /dev/null
+++ b/lib/Endpoint/GetKpiNewUsersDataSeries.php
@@ -0,0 +1,157 @@
+ Use this endpoint to retrieve a daily series of the total number of new users on each date.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `app_id` can be found at **Developer Console** > **API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.new_users.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "new_users" : (int) the number of daily new users
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/kpi/new_users/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['length', 'ending_at', 'app_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiNewUsersDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetKpiNewUsersDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiNewUsersDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiNewUsersDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiNewUsersDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiNewUsersDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiNewUsersDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetKpiUninstallsDataSeries.php b/lib/Endpoint/GetKpiUninstallsDataSeries.php
new file mode 100644
index 0000000..5d3b79e
--- /dev/null
+++ b/lib/Endpoint/GetKpiUninstallsDataSeries.php
@@ -0,0 +1,157 @@
+ Use this endpoint to retrieve a daily series of the total number of uninstalls on each date.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), API Keys can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `kpi.uninstalls.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "uninstalls" : (int) the number of uninstalls
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Maximum number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from **Settings > Setup and Testing > API Keys**. If excluded, results for all apps in workspace will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/kpi/uninstalls/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['length', 'ending_at', 'app_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetKpiUninstallsDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetKpiUninstallsDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiUninstallsDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiUninstallsDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiUninstallsDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiUninstallsDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetKpiUninstallsDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetMessagesScheduledBroadcast.php b/lib/Endpoint/GetMessagesScheduledBroadcast.php
new file mode 100644
index 0000000..f330c50
--- /dev/null
+++ b/lib/Endpoint/GetMessagesScheduledBroadcast.php
@@ -0,0 +1,149 @@
+ Use this endpoint to return a JSON list of information about scheduled campaigns and entry Canvases between now and a designated `end_time` specified in the request.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule_broadcasts` permission.
+ *
+ * Daily, recurring messages will only appear once with their next occurrence. Results returned in this endpoint are only for campaigns and Canvases created and scheduled in Braze.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "scheduled_broadcasts": [
+ * {
+ * "name" (string) the name of the scheduled boradcast,
+ * "id" (stings) the Canvas or campaign identifier,
+ * "type" (string) the broadcast type either Canvas or Campaign,
+ * "tags" (array) an array of tag names formatted as strings,
+ * "next_send_time" (string) The next send time formatted in ISO 8601, may also include time zone if not local/intelligent delivery,
+ * "schedule_type" (string) The schedule type, either local_time_zones, intelligent_delivery or the name of your company's time zone,
+ * },
+ * ]
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $end_time (Required) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format
+ *
+ * End date of the range to retrieve upcoming scheduled Campaigns and Canvases. This is treated as midnight in UTC time by the API.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/messages/scheduled_broadcasts';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['end_time']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('end_time', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastBadRequestException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastUnauthorizedException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastForbiddenException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastNotFoundException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastTooManyRequestsException
+ * @throws \Braze\Exception\GetMessagesScheduledBroadcastInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetMessagesScheduledBroadcastBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetMessagesScheduledBroadcastUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetMessagesScheduledBroadcastForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetMessagesScheduledBroadcastNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetMessagesScheduledBroadcastTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetMessagesScheduledBroadcastInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetPreferenceCenterV1ByPreferenceCenterExternalID.php b/lib/Endpoint/GetPreferenceCenterV1ByPreferenceCenterExternalID.php
new file mode 100644
index 0000000..621f5e3
--- /dev/null
+++ b/lib/Endpoint/GetPreferenceCenterV1ByPreferenceCenterExternalID.php
@@ -0,0 +1,148 @@
+ Use this endpoint to view the details for your preference centers, including when it was created and updated.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.get` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 1,000 requests per minute, per workspace.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preferenceCenterExternalID` | Required | String | The ID for your preference center. |
+ *
+ * ## Request parameters
+ *
+ * There are no request parameters for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location -g --request GET https://rest.iad-01.braze.com/preference_center/v1/preference_center_external_id \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "name": "My Preference Center",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "example_time_created",
+ * "updated_at": "example_time_updated",
+ * "preference_center_title": "Example preference center title",
+ * "preference_center_page_html": "HTML for preference center here",
+ * "confirmation_page_html": "HTML for confirmation page here",
+ * "redirect_page_html": null,
+ * "preference_center_options": {
+ * "meta-viewport-content": "width=device-width, initial-scale=2"
+ * },
+ * "state": "active"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $preferenceCenterExternalID, array $headerParameters = [])
+ {
+ $this->PreferenceCenterExternalID = $preferenceCenterExternalID;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{PreferenceCenterExternalID}'], [$this->PreferenceCenterExternalID], '/preference_center/v1/{PreferenceCenterExternalID}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserID.php b/lib/Endpoint/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserID.php
new file mode 100644
index 0000000..e22409f
--- /dev/null
+++ b/lib/Endpoint/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserID.php
@@ -0,0 +1,157 @@
+ Use this endpoint to generate a URL for a preference center.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.user.get` permission.
+ *
+ * Each preference center URL is unique to each user.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 1,000 requests per minute, per workspace.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preferenceCenterExternalID` | Required | String | The ID for your preference center. |
+ * | `userID` | Required | String | The user ID. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/preference_center/v1/$preference_center_external_id/url/$user_external_id' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "preference_center_url": "https://www.example.com/preferences"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $preference_center_api_id
+ * @var string $external_id (Required) String
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $preferenceCenterExternalID, string $userID, array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->PreferenceCenterExternalID = $preferenceCenterExternalID;
+ $this->UserID = $userID;
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{PreferenceCenterExternalID}', '{UserID}'], [$this->PreferenceCenterExternalID, $this->UserID], '/preference_center_v1/{PreferenceCenterExternalID}/url/{UserID}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['preference_center_api_id', 'external_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('preference_center_api_id', ['string']);
+ $optionsResolver->addAllowedTypes('external_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDBadRequestException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDUnauthorizedException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDForbiddenException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDNotFoundException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDTooManyRequestsException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetPreferenceCenterV1List.php b/lib/Endpoint/GetPreferenceCenterV1List.php
new file mode 100644
index 0000000..e5ab243
--- /dev/null
+++ b/lib/Endpoint/GetPreferenceCenterV1List.php
@@ -0,0 +1,154 @@
+ Use this endpoint to list your available preference centers.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.list` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 1,000 requests per minute, per workspace.
+ *
+ * ## Path and request parameters
+ *
+ * There are no path or request parameters for this endpoint.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location -g --request GET https://rest.iad-01.braze.com/preference_center/v1/list \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "preference_centers": [
+ * {
+ * "name": "My Preference Center 1",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-08-17T15:46:10Z",
+ * "updated_at": "2022-08-17T15:46:10Z"
+ * },
+ * {
+ * "name": "My Preference Center 2",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-08-19T11:13:06Z",
+ * "updated_at": "2022-08-19T11:13:06Z"
+ * },
+ * {
+ * "name": "My Preference Center 3",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-08-19T11:30:50Z",
+ * "updated_at": "2022-08-19T11:30:50Z"
+ * },
+ * {
+ * "name": "My Preference Center 4",
+ * "preference_center_api_id": "preference_center_api_id",
+ * "created_at": "2022-09-13T20:41:34Z",
+ * "updated_at": "2022-09-13T20:41:34Z"
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $headerParameters = [])
+ {
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/preference_center/v1/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListBadRequestException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListUnauthorizedException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListForbiddenException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListNotFoundException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListTooManyRequestsException
+ * @throws \Braze\Exception\GetPreferenceCenterV1ListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetPreferenceCenterV1ListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPreferenceCenterV1ListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetPurchasesProductList.php b/lib/Endpoint/GetPurchasesProductList.php
new file mode 100644
index 0000000..25547a7
--- /dev/null
+++ b/lib/Endpoint/GetPurchasesProductList.php
@@ -0,0 +1,143 @@
+ Use this endpoint to return a paginated lists of product IDs.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `purchases.product_list` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/events/list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "products": [
+ * "product_name" (string), the name of the product
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of your product list that you would like to view.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/purchases/product_list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['page']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('page', ['int']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetPurchasesProductListBadRequestException
+ * @throws \Braze\Exception\GetPurchasesProductListUnauthorizedException
+ * @throws \Braze\Exception\GetPurchasesProductListForbiddenException
+ * @throws \Braze\Exception\GetPurchasesProductListNotFoundException
+ * @throws \Braze\Exception\GetPurchasesProductListTooManyRequestsException
+ * @throws \Braze\Exception\GetPurchasesProductListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetPurchasesProductListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesProductListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesProductListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesProductListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesProductListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesProductListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetPurchasesQuantitySeries.php b/lib/Endpoint/GetPurchasesQuantitySeries.php
new file mode 100644
index 0000000..061fe41
--- /dev/null
+++ b/lib/Endpoint/GetPurchasesQuantitySeries.php
@@ -0,0 +1,166 @@
+ Use this endpoint to return the total number of purchases in your app over a time range.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `purchases.quantity_series` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/events/list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/purchases/quantity_series?length=100' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "purchase_quantity" : (int) the number of items purchased in the time period
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $ending_at (Optional) Datetime (ISO 8601 string)
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var int $length (Required) Integer
+ * Maximum number of days before ending_at to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var int $unit (Optional) String
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $app_id (Optional) String
+ * App API identifier retrieved from the Settings > Setup and Testing > API Keys to limit analytics to a specific app
+ * @var string $product (Optional) String
+ * Name of product to filter response by. If excluded, results for all apps will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/purchases/quantity_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['ending_at', 'length', 'unit', 'app_id', 'product']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('unit', ['int']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+ $optionsResolver->addAllowedTypes('product', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesBadRequestException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesUnauthorizedException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesForbiddenException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesNotFoundException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetPurchasesQuantitySeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetPurchasesQuantitySeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesQuantitySeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesQuantitySeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesQuantitySeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesQuantitySeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesQuantitySeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetPurchasesRevenueSeries.php b/lib/Endpoint/GetPurchasesRevenueSeries.php
new file mode 100644
index 0000000..3b20b04
--- /dev/null
+++ b/lib/Endpoint/GetPurchasesRevenueSeries.php
@@ -0,0 +1,166 @@
+ Use this endpoint to return the total money spent in your app over a time range.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `purchases.revenue_series` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/events/list` endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request GET 'https://rest.iad-01.braze.com/purchases/revenue_series?length=100' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) the date as ISO 8601 date,
+ * "revenue" : (int) amount of revenue for the time period
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $ending_at (Optional) Datetime (ISO 8601 string)
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var int $length (Required) Integer
+ * Maximum number of days before ending_at to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var int $unit (Optional) String
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $app_id (Optional) String
+ * App API identifier retrieved from the Settings > Setup and Testing > API Keys to limit analytics to a specific app
+ * @var string $product (Optional) String
+ * Name of product to filter response by. If excluded, results for all apps will be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/purchases/revenue_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['ending_at', 'length', 'unit', 'app_id', 'product']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('unit', ['int']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+ $optionsResolver->addAllowedTypes('product', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesBadRequestException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesForbiddenException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesNotFoundException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetPurchasesRevenueSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetPurchasesRevenueSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesRevenueSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesRevenueSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesRevenueSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesRevenueSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetPurchasesRevenueSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetScimV2User.php b/lib/Endpoint/GetScimV2User.php
new file mode 100644
index 0000000..e1708a5
--- /dev/null
+++ b/lib/Endpoint/GetScimV2User.php
@@ -0,0 +1,185 @@
+ This endpoint allows you to look up an existing dashboard user account by specifying their email in the filter query parameter.
+ *
+ * Note that when the query parameter is URL encoded it will read like this:
+ *
+ * `/scim/v2/Users?filter=userName eq "user@test.com"`
+ *
+ * For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, DELETE, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `userName@example.com` | Required | String | The user's email. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE
+ * Authorization: Bearer YOUR-SCIM-TOKEN-HERE
+ * {
+ * "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
+ * "totalResults": 1,
+ * "Resources": [
+ * {
+ * "userName": "user@test.com",
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "241adcd25789fabcded",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["admin"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $filter
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/scim/v2/Users';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['filter']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('filter', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'X-Request-Origin', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('X-Request-Origin', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetScimV2UserBadRequestException
+ * @throws \Braze\Exception\GetScimV2UserUnauthorizedException
+ * @throws \Braze\Exception\GetScimV2UserForbiddenException
+ * @throws \Braze\Exception\GetScimV2UserNotFoundException
+ * @throws \Braze\Exception\GetScimV2UserTooManyRequestsException
+ * @throws \Braze\Exception\GetScimV2UserInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetScimV2UserBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetScimV2UserById.php b/lib/Endpoint/GetScimV2UserById.php
new file mode 100644
index 0000000..075698d
--- /dev/null
+++ b/lib/Endpoint/GetScimV2UserById.php
@@ -0,0 +1,158 @@
+ This endpoint allows you to look up an existing dashboard user account by specifying the resource `id` returned by the SCIM [`POST`](https://www.braze.com/docs/scim/post_create_user_account/) method.
+ *
+ * For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, DELETE, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `id` | Required | String | The user's resource ID. This parameter is returned by the `POST` `/scim/v2/Users/` or `GET` `/scim/v2/Users?filter=userName eq "user@test.com"` methods. |
+ *
+ * ## Request parameters
+ *
+ * There is no request body for this endpoint.
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "userName": "user@test.com",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "241adcd25789fabcded",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["admin"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $id, array $headerParameters = [])
+ {
+ $this->id = $id;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{id}'], [$this->id], '/scim/v2/Users/{id}');
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'X-Request-Origin', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('X-Request-Origin', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetScimV2UserByIdBadRequestException
+ * @throws \Braze\Exception\GetScimV2UserByIdUnauthorizedException
+ * @throws \Braze\Exception\GetScimV2UserByIdForbiddenException
+ * @throws \Braze\Exception\GetScimV2UserByIdNotFoundException
+ * @throws \Braze\Exception\GetScimV2UserByIdTooManyRequestsException
+ * @throws \Braze\Exception\GetScimV2UserByIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetScimV2UserByIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserByIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserByIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserByIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserByIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetScimV2UserByIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSegmentsDataSeries.php b/lib/Endpoint/GetSegmentsDataSeries.php
new file mode 100644
index 0000000..a4d4951
--- /dev/null
+++ b/lib/Endpoint/GetSegmentsDataSeries.php
@@ -0,0 +1,159 @@
+ Use this endpoint to retrieve a daily series of the estimated size of a segment over time.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `segments.data_series` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) date as ISO 8601 date,
+ * "size" : (int) size of the segment on that date
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $segment_id (Required) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `segment_id` for a given segment can be found in your **Settings > Setup and Testing > API Keys.** within your Braze account or you can use the [Segment List Endpoint](https://www.braze.com/docs/api/endpoints/export/get_segment/).
+ * @var int $length (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series - must be between 1 and 100 (inclusive)
+ * @var string $ending_at (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/segments/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['segment_id', 'length', 'ending_at']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('segment_id', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSegmentsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetSegmentsDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSegmentsDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSegmentsDetail.php b/lib/Endpoint/GetSegmentsDetail.php
new file mode 100644
index 0000000..c1a43b1
--- /dev/null
+++ b/lib/Endpoint/GetSegmentsDetail.php
@@ -0,0 +1,150 @@
+ Use this endpoint to retrieve relevant information on a segment, which can be identified by the `segment_id`.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `segments.details` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "created_at" : (string) date created as ISO 8601 date,
+ * "updated_at" : (string) date last updated as ISO 8601 date,
+ * "name" : (string) segment name,
+ * "description" : (string) human-readable description of filters,
+ * "text_description" : (string) segment description,
+ * "tags" : (array) tag names associated with the segment
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $segment_id (Required) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/).
+ *
+ * The `segment_id` for a given segment can be found in your **Settings > Setup and Testing > API Keys** within your Braze account or you can use the [Segment List Endpoint](https://www.braze.com/docs/api/endpoints/export/get_segment/).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/segments/details';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['segment_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('segment_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSegmentsDetailBadRequestException
+ * @throws \Braze\Exception\GetSegmentsDetailUnauthorizedException
+ * @throws \Braze\Exception\GetSegmentsDetailForbiddenException
+ * @throws \Braze\Exception\GetSegmentsDetailNotFoundException
+ * @throws \Braze\Exception\GetSegmentsDetailTooManyRequestsException
+ * @throws \Braze\Exception\GetSegmentsDetailInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSegmentsDetailBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDetailUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDetailForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDetailNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDetailTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsDetailInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSegmentsList.php b/lib/Endpoint/GetSegmentsList.php
new file mode 100644
index 0000000..1d05a0e
--- /dev/null
+++ b/lib/Endpoint/GetSegmentsList.php
@@ -0,0 +1,158 @@
+ Use this endpoint to export a list of segments, each of which will include its name, Segment API identifier, and whether it has analytics tracking enabled.
+ *
+ * The segments are returned in groups of 100 sorted by time of creation (oldest to newest by default). Archived segments are not included.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `segments.list` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "segments" : [
+ * {
+ * "id" : (string) Segment API Identifier,
+ * "name" : (string) segment name,
+ * "analytics_tracking_enabled" : (boolean) whether the segment has analytics tracking enabled,
+ * "tags" : (array) tag names associated with the segment
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $page (Optional) Integer
+ *
+ * The page of segments to return, defaults to 0 (returns the first set of up to 100)
+ * @var string $sort_direction (Optional) String
+ *
+ * - Sort creation time from newest to oldest: pass in the value `desc`.
+ * - Sort creation time from oldest to newest: pass in the value `asc`.
+ *
+ * If `sort_direction` is not included, the default order is oldest to newest.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/segments/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['page', 'sort_direction']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('page', ['int']);
+ $optionsResolver->addAllowedTypes('sort_direction', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSegmentsListBadRequestException
+ * @throws \Braze\Exception\GetSegmentsListUnauthorizedException
+ * @throws \Braze\Exception\GetSegmentsListForbiddenException
+ * @throws \Braze\Exception\GetSegmentsListNotFoundException
+ * @throws \Braze\Exception\GetSegmentsListTooManyRequestsException
+ * @throws \Braze\Exception\GetSegmentsListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSegmentsListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSegmentsListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSendsDataSeries.php b/lib/Endpoint/GetSendsDataSeries.php
new file mode 100644
index 0000000..c6e471b
--- /dev/null
+++ b/lib/Endpoint/GetSendsDataSeries.php
@@ -0,0 +1,192 @@
+ Use this endpoint to retrieve a daily series of various stats for a tracked `send_id`.
+ *
+ * Braze stores send analytics for 14 days after the send.
+ *
+ * Campaign conversions will be attributed towards the most recent send id that a given user has received from the campaign.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sends.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ### Send analytics endpoint API response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "variation_name": (string) variation name,
+ * "sent": (int) the number of sends,
+ * "delivered": (int) the number of messages successfully delivered,
+ * "undelivered": (int) the number of undelivered,
+ * "delivery_failed": (int) the number of rejected,
+ * "direct_opens": (int) the number of direct opens,
+ * "total_opens": (int) the number of total opens,
+ * "bounces": (int) the number of bounces,
+ * "body_clicks": (int) the number of body clicks,
+ * "revenue": (float) the number of dollars of revenue (USD),
+ * "unique_recipients": (int) the number of unique recipients,
+ * "conversions": (int) the number of conversions,
+ * "conversions_by_send_time": (int) the number of conversions,
+ * "conversions1": (int, optional) the number of conversions for the second conversion event,
+ * "conversions1_by_send_time": (int, optional) the number of conversions for the second conversion event by send time,
+ * "conversions2": (int, optional) the number of conversions for the third conversion event,
+ * "conversions2_by_send_time": (int, optional) the number of conversions for the third conversion event by send time,
+ * "conversions3": (int, optional) the number of conversions for the fourth conversion event,
+ * "conversions3_by_send_time": (int, optional) the number of conversions for the fourth conversion event by send time
+ * }
+ * ]
+ * },
+ * "conversions_by_send_time": 0,
+ * "conversions1_by_send_time": 0,
+ * "conversions2_by_send_time": 0,
+ * "conversions3_by_send_time": 0,
+ * "conversions": 0,
+ * "conversions1": 0,
+ * "conversions2": 0,
+ * "conversions3": 0,
+ * "unique_recipients": 1,
+ * "revenue": 0
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string (Required) String
+ *
+ * See [Campaign API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var string (Required) String
+ *
+ * See [Send API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * @var int (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series. Must be between 1 and 100 (inclusive).
+ * @var string (Optional) Datetime ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/sends/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['campaign_id', 'send_id', 'length', 'ending_at']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('campaign_id', ['string']);
+ $optionsResolver->addAllowedTypes('send_id', ['string']);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSendsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetSendsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetSendsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetSendsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetSendsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetSendsDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSendsDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSendsDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSendsDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSendsDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSendsDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSendsDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSessionsDataSeries.php b/lib/Endpoint/GetSessionsDataSeries.php
new file mode 100644
index 0000000..e6aece8
--- /dev/null
+++ b/lib/Endpoint/GetSessionsDataSeries.php
@@ -0,0 +1,165 @@
+ Use this endpoint to retrieve a series of the number of sessions for your app over a designated time period.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sessions.data_series` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "data" : [
+ * {
+ * "time" : (string) point in time - as ISO 8601 extended when unit is "hour" and as ISO 8601 date when unit is "day",
+ * "sessions" : (int)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var int $length (Required) Integer
+ *
+ * Max number of days before `ending_at` to include in the returned series - must be between 1 and 100 (inclusive)
+ * @var string $unit (Optional) String
+ *
+ * Unit of time between data points. Can be `day` or `hour`, defaults to `day`.
+ * @var string $ending_at (Optional) Datetime (ISO 8601 string)
+ *
+ * Date on which the data series should end. Defaults to time of the request.
+ * @var string $app_id (Optional) String
+ *
+ * App API identifier retrieved from the **Settings > Setup and Testing > API Keys** to limit analytics to a specific app
+ * @var string $segment_id (Required) String
+ *
+ * See [Segment API identifier](https://www.braze.com/docs/api/identifier_types/). Segment ID indicating the analytics-enabled segment for which sessions should be returned.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/sessions/data_series';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['length', 'unit', 'ending_at', 'app_id', 'segment_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('length', ['int']);
+ $optionsResolver->addAllowedTypes('unit', ['string']);
+ $optionsResolver->addAllowedTypes('ending_at', ['string']);
+ $optionsResolver->addAllowedTypes('app_id', ['string']);
+ $optionsResolver->addAllowedTypes('segment_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSessionsDataSeriesBadRequestException
+ * @throws \Braze\Exception\GetSessionsDataSeriesUnauthorizedException
+ * @throws \Braze\Exception\GetSessionsDataSeriesForbiddenException
+ * @throws \Braze\Exception\GetSessionsDataSeriesNotFoundException
+ * @throws \Braze\Exception\GetSessionsDataSeriesTooManyRequestsException
+ * @throws \Braze\Exception\GetSessionsDataSeriesInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSessionsDataSeriesBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSessionsDataSeriesUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSessionsDataSeriesForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSessionsDataSeriesNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSessionsDataSeriesTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSessionsDataSeriesInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSmsInvalidPhoneNumber.php b/lib/Endpoint/GetSmsInvalidPhoneNumber.php
new file mode 100644
index 0000000..7f7c326
--- /dev/null
+++ b/lib/Endpoint/GetSmsInvalidPhoneNumber.php
@@ -0,0 +1,170 @@
+ Use this endpoint to pull a list of phone numbers that have been deemed “invalid” within a certain time frame.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sms.invalid_phone_numbers` permission.
+ *
+ * - If you provide a `start_date`, an `end_date`, and `phone_numbers`, we prioritize the given phone numbers and disregard the date range.
+ * - If your date range has more than the `limit` number of invalid phone numbers, you will need to make multiple API calls with increasing the `offset` each time until a call returns either fewer than `limit` or zero results.
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * Entries are listed in descending order.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "sms": [
+ * {
+ * "phone": "12345678900",
+ * "invalid_detected_at": "2016-08-25 15:24:32 +0000"
+ * },
+ * {
+ * "phone": "12345678901",
+ * "invalid_detected_at": "2016-08-24 17:41:58 +0000"
+ * },
+ * {
+ * "phone": "12345678902",
+ * "invalid_detected_at": "2016-08-24 12:01:13 +0000"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $start_date (Optional*) String in YYYY-MM-DD format
+ * Start date of the range to retrieve invalid phone numbers, must be earlier than `end_date`. This is treated as midnight in UTC time by the API.
+ * @var string $end_date (Optional*) String in YYYY-MM-DD format
+ * End date of the range to retrieve invalid phone numbers. This is treated as midnight in UTC time by the API.
+ * @var int $limit (Optional) Integer
+ * Optional field to limit the number of results returned. Defaults to 100, maximum is 500.
+ * @var int $offset (Optional) Integer
+ * Optional beginning point in the list to retrieve from
+ * @var int $phone_numbers (Optional*) Array of Strings in e.164 format
+ * If provided, we will return the phone number if it has been found to be invalid.
+ *
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/sms/invalid_phone_numbers';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['start_date', 'end_date', 'limit', 'offset', 'phone_numbers']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('start_date', ['string']);
+ $optionsResolver->addAllowedTypes('end_date', ['string']);
+ $optionsResolver->addAllowedTypes('limit', ['int']);
+ $optionsResolver->addAllowedTypes('offset', ['int']);
+ $optionsResolver->addAllowedTypes('phone_numbers', ['int']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberBadRequestException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberUnauthorizedException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberForbiddenException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberNotFoundException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberTooManyRequestsException
+ * @throws \Braze\Exception\GetSmsInvalidPhoneNumberInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSmsInvalidPhoneNumberBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSmsInvalidPhoneNumberUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSmsInvalidPhoneNumberForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSmsInvalidPhoneNumberNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSmsInvalidPhoneNumberTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSmsInvalidPhoneNumberInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSubscriptionStatusGet.php b/lib/Endpoint/GetSubscriptionStatusGet.php
new file mode 100644
index 0000000..d905929
--- /dev/null
+++ b/lib/Endpoint/GetSubscriptionStatusGet.php
@@ -0,0 +1,158 @@
+ Use this endpoint to get the subscription state of a user in a subscription group.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.status.get` permission.
+ *
+ * These groups will be available on the **Subscription Group** page. The response from this endpoint will include the external ID and either subscribed, unsubscribed, or unknown for the specific subscription group requested in the API call. This can be used to update the subscription group state in subsequent API calls or to be displayed on a hosted web page.
+ *
+ * \*Either `external_id` or `phone` are required. When both are submitted, only the external_id is used for querying and the phone number is applied to that user.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Response
+ *
+ * All successful responses will return `subscribed`, `unsubscribed`, or `unknown` depending on status and user history with the subscription group.
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "status": {
+ * "1": "Unsubscribed",
+ * "2": "Subscribed"
+ * },
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $subscription_group_id (Required) String
+ *
+ * The `id` of your subscription group
+ * @var string $external_id (Required*) String
+ *
+ * The `external_id` of the user (must include at least one and at most 50 `external_ids`).
+ *
+ * When both an `external_id` and `phone` are submitted, only the external_id(s) provided will be applied to the result query.
+ * @var string $phone (Required*) String in [E.164](https://en.wikipedia.org/wiki/E.164) format
+ *
+ * The phone number of the user (must include at least one phone number and at most 50 phone numbers).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/subscription/status/get';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['subscription_group_id', 'external_id', 'phone']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('subscription_group_id', ['string']);
+ $optionsResolver->addAllowedTypes('external_id', ['string']);
+ $optionsResolver->addAllowedTypes('phone', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSubscriptionStatusGetBadRequestException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetUnauthorizedException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetForbiddenException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetNotFoundException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetTooManyRequestsException
+ * @throws \Braze\Exception\GetSubscriptionStatusGetInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSubscriptionStatusGetBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionStatusGetUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionStatusGetForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionStatusGetNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionStatusGetTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionStatusGetInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetSubscriptionUserStatus.php b/lib/Endpoint/GetSubscriptionUserStatus.php
new file mode 100644
index 0000000..2e0e77e
--- /dev/null
+++ b/lib/Endpoint/GetSubscriptionUserStatus.php
@@ -0,0 +1,141 @@
+ Use this endpoint to list and get the subscription groups of a certain user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.groups.get` permission.
+ *
+ * If there are multiple users (multiple external IDs) who share the same email address, all users will be returned as a separate user (even if they have the same email address or subscription group).
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $external_id (Required*) String
+ *
+ * The `external_id` of the user (must include at least one and at most 50 `external_ids`)
+ * @var int $limit (Optional) Integer
+ *
+ * The limit on the maximum number of results returned. Default (and max) limit is 100.
+ * @var int $offset (Optional) Integer
+ *
+ * Number of templates to skip before returning the rest of the templates that fit the search criteria
+ * @var string $phone (Required*) String in [E.164](https://en.wikipedia.org/wiki/E.164) format
+ *
+ * The phone number of the user. Must include at least one phone number (with a max of 50).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/subscription/user/status';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['external_id', 'limit', 'offset', 'phone']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('external_id', ['string']);
+ $optionsResolver->addAllowedTypes('limit', ['int']);
+ $optionsResolver->addAllowedTypes('offset', ['int']);
+ $optionsResolver->addAllowedTypes('phone', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetSubscriptionUserStatusBadRequestException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusUnauthorizedException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusForbiddenException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusNotFoundException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusTooManyRequestsException
+ * @throws \Braze\Exception\GetSubscriptionUserStatusInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetSubscriptionUserStatusBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionUserStatusUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionUserStatusForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionUserStatusNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionUserStatusTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetSubscriptionUserStatusInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetTemplatesEmailInfo.php b/lib/Endpoint/GetTemplatesEmailInfo.php
new file mode 100644
index 0000000..f9d4abd
--- /dev/null
+++ b/lib/Endpoint/GetTemplatesEmailInfo.php
@@ -0,0 +1,153 @@
+ Use this endpoint to get information on your email templates.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.info` permission.
+ *
+ * > **Important:** Templates built using the drag-and-drop editor for email are not accepted.
+ *
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "email_template_id": (string) your email template's API Identifier,
+ * "template_name": (string) the name of your email template,
+ * "description": (string) email template description,
+ * "subject": (string) the email template subject line,
+ * "preheader": (optional, string) the email preheader used to generate previews in some clients),
+ * "body": (optional, string) the email template body that may include HTML,
+ * "plaintext_body": (optional, string) a plaintext version of the email template body,
+ * "should_inline_css": (optional, boolean) whether there is inline CSS in the body of the template - defaults to the css inlining value for the App Group,
+ * "tags": (string) tag names,
+ * "created_at": (string, in ISO 8601),
+ * "updated_at": (string, in ISO 8601)
+ * }
+ *
+ * ```
+ *
+ * Images in this response will show in the `body` variable as HTML.
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $email_template_id (Required) String
+ *
+ * See [email template's API identifier](https://www.braze.com/docs/api/identifier_types/).
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/templates/email/info';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['email_template_id']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('email_template_id', ['string']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetTemplatesEmailInfoBadRequestException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoUnauthorizedException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoForbiddenException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoNotFoundException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoTooManyRequestsException
+ * @throws \Braze\Exception\GetTemplatesEmailInfoInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetTemplatesEmailInfoBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailInfoUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailInfoForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailInfoNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailInfoTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailInfoInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/GetTemplatesEmailList.php b/lib/Endpoint/GetTemplatesEmailList.php
new file mode 100644
index 0000000..8933ce9
--- /dev/null
+++ b/lib/Endpoint/GetTemplatesEmailList.php
@@ -0,0 +1,157 @@
+ Use this endpoint to get a list of available templates in your Braze account.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.list` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Response
+ *
+ * > **Important:** Templates built using the Drag & Drop Editor for email are not provided in this response.
+ *
+ *
+ * ``` json
+ * {
+ * "count": number of templates returned
+ * "templates": [template with the following properties]:
+ * "email_template_id": (string) your email template's API Identifier,
+ * "template_name": (string) the name of your email template,
+ * "created_at": (string, in ISO 8601),
+ * "updated_at": (string, in ISO 8601),
+ * "tags": (array of strings) tags appended to the template
+ * }
+ *
+ * ```
+ *
+ * @param array $queryParameters {
+ *
+ * @var string $modified_after (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only templates updated at or after the given time.
+ * @var string $modified_before (Optional) String in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ *
+ * Retrieve only templates updated at or before the given time.
+ * @var int $limit (Optional) Positive Number
+ *
+ * Maximum number of templates to retrieve. Default to 100 if not provided, with a maximum acceptable value of 1000.
+ * @var int $offset (Optional) Positive Number
+ *
+ * Number of templates to skip before returning rest of the templates that fit the search criteria.
+ * }
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(array $queryParameters = [], array $headerParameters = [])
+ {
+ $this->queryParameters = $queryParameters;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'GET';
+ }
+
+ public function getUri(): string
+ {
+ return '/templates/email/list';
+ }
+
+ public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
+ {
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getQueryOptionsResolver();
+ $optionsResolver->setDefined(['modified_after', 'modified_before', 'limit', 'offset']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('modified_after', ['string']);
+ $optionsResolver->addAllowedTypes('modified_before', ['string']);
+ $optionsResolver->addAllowedTypes('limit', ['int']);
+ $optionsResolver->addAllowedTypes('offset', ['int']);
+
+ return $optionsResolver;
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\GetTemplatesEmailListBadRequestException
+ * @throws \Braze\Exception\GetTemplatesEmailListUnauthorizedException
+ * @throws \Braze\Exception\GetTemplatesEmailListForbiddenException
+ * @throws \Braze\Exception\GetTemplatesEmailListNotFoundException
+ * @throws \Braze\Exception\GetTemplatesEmailListTooManyRequestsException
+ * @throws \Braze\Exception\GetTemplatesEmailListInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\GetTemplatesEmailListBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailListUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailListForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailListNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailListTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\GetTemplatesEmailListInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PatchCatalogsByCatalogNameItem.php b/lib/Endpoint/PatchCatalogsByCatalogNameItem.php
new file mode 100644
index 0000000..4607afa
--- /dev/null
+++ b/lib/Endpoint/PatchCatalogsByCatalogNameItem.php
@@ -0,0 +1,195 @@
+ Use this endpoint to delete multiple items in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.delete_items` permission.
+ *
+ * Each request can support up to 50 items. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain an `id` referencing the items Braze should delete. Up to 50 item objects are allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {"id": "restaurant1"},
+ * {"id": "restaurant2"},
+ * {"id": "restaurant3"}
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "items-missing-ids",
+ * "message": "There are 1 item(s) that do not have ids",
+ * "parameters": [],
+ * "parameter_values": []
+ * }
+ * ],
+ * "message": "Invalid Request",
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `ids-too-large` | Item IDs can't be more than 250 characters. |
+ * | `ids-not-unique` | Check that the item IDs are unique in the request. |
+ * | `ids-not-strings` | Item IDs must be of type string. |
+ * | `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |
+ * | `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |
+ * | `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'PATCH';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}'], [$this->catalog_name], '/catalogs/{catalog_name}/items');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\PatchCatalogsByCatalogNameItemBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PatchCatalogsByCatalogNameItemByItemId.php b/lib/Endpoint/PatchCatalogsByCatalogNameItemByItemId.php
new file mode 100644
index 0000000..a6908df
--- /dev/null
+++ b/lib/Endpoint/PatchCatalogsByCatalogNameItemByItemId.php
@@ -0,0 +1,209 @@
+ Use this endpoint to edit an item in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.update_item` permission.
+ *
+ * ## Rate Limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request PATCH 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "Name": "Restaurant",
+ * "Loyalty_Program": false,
+ * "Open_Time": "2021-09-03T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-fields",
+ * "message": "Some of the fields given do not exist in the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant1"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |
+ * | `id-in-body` | An item ID already exists in the catalog. |
+ * | `ids-too-large` | Character limit for each item ID is 250 characters. |
+ * | `invalid-ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid-fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |
+ * | `item-not-found` | Check that the item is in the catalog. |
+ * | `item-array-invalid` | `items` must be an array of objects. |
+ * | `items-too-large` | Character limit for each item is 5,000 characters. |
+ * | `request-includes-too-many-items` | You can only edit one catalog item per request. |
+ * | `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable-to-coerce-value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->item_id = $itemId;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'PATCH';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}', '{item_id}'], [$this->catalog_name, $this->item_id], '/catalogs/{catalog_name}/items/{item_id}');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\PatchCatalogsByCatalogNameItemByItemIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PatchCatalogsByCatalogNameItemByItemIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php b/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php
new file mode 100644
index 0000000..1bb09f6
--- /dev/null
+++ b/lib/Endpoint/PostCampaignsTriggerScheduleCreate.php
@@ -0,0 +1,154 @@
+ Use this endpoint to send dashboard created campaign messages (up to 90 days in advance) via API-triggered delivery, allowing you to decide what action should trigger the message to be sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.schedule.create` permission.
+ *
+ * You can pass in `trigger_properties` that will be templated into the message itself.
+ *
+ * Note that to send messages with this endpoint, you must have a [Campaign ID](https://www.braze.com/docs/api/identifier_types/), created when you build an [API-Triggered Campaign](https://www.braze.com/docs/api/api_campaigns/).
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific external_ids, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/) |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `recipients` | Optional | Array of recipient objects | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `trigger_properties` | Optional | Object | Personalization key-value pairs for all users in this send. See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). |
+ * | `schedule` | Required | Schedule object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-API-KEY-HERE
+ * {
+ * {
+ * "dispatch_id": "dispatch_identifier",
+ * "schedule_id": "schedule_identifier",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/trigger/schedule/create';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleCreateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleCreateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleCreateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleCreateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleCreateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleCreateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php b/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php
new file mode 100644
index 0000000..858c52c
--- /dev/null
+++ b/lib/Endpoint/PostCampaignsTriggerScheduleDelete.php
@@ -0,0 +1,124 @@
+ The delete schedule endpoint allows you to cancel a message that you previously scheduled API-triggered Canvases before it has been sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.schedule.delete` permission.
+ *
+ * Scheduled messages or triggers that are deleted very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second deletions could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `schedule_id` | Required | String | The `schedule_id` to delete (obtained from the response to create schedule). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/trigger/schedule/delete';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleDeleteInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleDeleteUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleDeleteForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleDeleteNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleDeleteTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleDeleteInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php b/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php
new file mode 100644
index 0000000..c9ab856
--- /dev/null
+++ b/lib/Endpoint/PostCampaignsTriggerScheduleUpdate.php
@@ -0,0 +1,129 @@
+ Use this endpoint to update scheduled API-triggered campaigns created in the dashboard, allowing you to decide what action should trigger the message to be sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.schedule.update` permission.
+ *
+ * You can pass in `trigger_properties` that will be templated into the message itself.
+ *
+ * Note that to send messages with this endpoint, you must have a campaign ID, created when you build an [API-triggered campaign](https://www.braze.com/docs/api/api_campaigns/).
+ *
+ * Any schedule will completely overwrite the one that you provided in the create schedule request or in previous update schedule requests. For example, if you originally provide `"schedule" : {"time" : "2015-02-20T13:14:47", "in_local_time" : true}` and then in your update you provide `"schedule" : {"time" : "2015-02-20T14:14:47"}`, your message will now be sent at the provided time in UTC, not in the user's local time. Scheduled triggers that are updated very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second changes could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/) |
+ * | `schedule_id` | Optional | String | The `schedule_id` to update (obtained from the response to create schedule). |
+ * | `schedule` | Required | Object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/trigger/schedule/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerScheduleUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerScheduleUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCampaignsTriggerSend.php b/lib/Endpoint/PostCampaignsTriggerSend.php
new file mode 100644
index 0000000..4199231
--- /dev/null
+++ b/lib/Endpoint/PostCampaignsTriggerSend.php
@@ -0,0 +1,156 @@
+ Use this endpoint to send immediate, ad-hoc messages to designated users via API-triggered delivery.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `campaigns.trigger.send` permission.
+ *
+ * API-triggered delivery allows you to house message content inside of the Braze dashboard while dictating when a message is sent, and to whom via your API.
+ *
+ * If you are targeting a segment, a record of your request will be stored in the [Developer Console](https://dashboard.braze.com/app_settings/developer_console/activitylog/). Note that to send messages with this endpoint, you must have a [campaign ID](https://www.braze.com/docs/api/identifier_types/) created when you build an [API-triggered campaign](https://www.braze.com/docs/api/api_campaigns/).
+ *
+ * ## Rate limit
+ *
+ * When specifying a segment or Connected Audience in your request, we apply a rate limit of 250 requests per minute to this endpoint. Otherwise, if specifying an `external_id`, this endpoint has a default rate limit of 250,000 requests per hour, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific `external_ids`, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `trigger_properties` | Optional | Object | See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). Personalization key-value pairs that will apply to all users in this request. |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your campaign to a larger than expected audience. |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `recipients` | Optional | Array | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). If not provided and `broadcast` is set to true, the message will send to the entire segment targeted by the campaign. |
+ *
+ * The recipients array may contain up to 50 objects, with each object containing a single `external_user_id` string and `trigger_properties` object.
+ *
+ * When `send_to_existing_only` is `true`, Braze will only send the message to existing users. When `send_to_existing_only` is `false` and a user with the given `id` does not exist, Braze will create a user with that id and attributes before sending the message.
+ *
+ * > Important: A user’s subscription group status can be updated via the inclusion of a subscription_groups parameter within the attributes object. This is currently in early access. Contact your Braze customer success manager if you’re interested in participating in the early access. More details can be found in the [User attributes object](https://www.braze.com/docs/api/objects_filters/user_attributes_object).
+ *
+ *
+ * ## Response details
+ *
+ * Message sending endpoint responses will include the message’s `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the ID of the message dispatch, a unique ID for each transmission sent from the Braze platform. When using this endpoint, you receive a single `dispatch_id` for an entire batched set of users. For more information on `dispatch_id` check out out our documentation on [Dispatch ID Behavior](https://www.braze.com/docs/help/help_articles/data/dispatch_id/).
+ *
+ * ## Create send endpoint
+ *
+ **Using the attributes object in campaigns**
+ *
+ * Braze has a Messaging Object called `Attributes` that will allow you to add, create, or update attributes and values for a user before you send them an API-triggered campaigns using the `campaign/trigger/send` endpoint as this API call will process the User Attributes object before it processes and sends the campaign. This helps minimize the risk of there being issues caused by [race conditions](https://www.braze.com/docs/help/best_practices/race_conditions/).
+ *
+ * > **Important:** Looking for the Canvas version of this endpoint? Check out [Sending Canvas messages via API-triggered delivery](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_canvases/#create-send-endpoint).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/campaigns/trigger/send';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCampaignsTriggerSendBadRequestException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendUnauthorizedException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendForbiddenException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendNotFoundException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendTooManyRequestsException
+ * @throws \Braze\Exception\PostCampaignsTriggerSendInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerSendUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerSendForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerSendNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerSendTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCampaignsTriggerSendInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCanvasTriggerScheduleCreate.php b/lib/Endpoint/PostCanvasTriggerScheduleCreate.php
new file mode 100644
index 0000000..cd73fa9
--- /dev/null
+++ b/lib/Endpoint/PostCanvasTriggerScheduleCreate.php
@@ -0,0 +1,138 @@
+ Use this endpoint to schedule Canvas messages (up to 90 days in advance) via API-triggered delivery, allowing you to decide what action should trigger the message to be sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.schedule.create` permission.
+ *
+ * You can pass in `canvas_entry_properties` that will be templated into the messages sent by the first steps of the Canvas.
+ *
+ * Note that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier) created when you build a Canvas.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific external_ids, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `recipients` | Optional | Array of recipient objects | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `trigger_properties` | Optional | Object | Personalization key-value pairs for all users in this send. See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). |
+ * | `schedule` | Required | Schedule object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/trigger/schedule/create';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleCreateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleCreateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleCreateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleCreateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleCreateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleCreateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCanvasTriggerScheduleDelete.php b/lib/Endpoint/PostCanvasTriggerScheduleDelete.php
new file mode 100644
index 0000000..05af2f2
--- /dev/null
+++ b/lib/Endpoint/PostCanvasTriggerScheduleDelete.php
@@ -0,0 +1,122 @@
+ Use this endpoint to cancel a Canvas message that you previously scheduled via API-triggered before it has been sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.schedule.delete` permission.
+ *
+ * Scheduled messages or triggers that are deleted very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second deletions could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://braze.com/docs/api/identifier_types/). |
+ * | `schedule_id` | Required | String | The `schedule_id` to delete (obtained from the response to create schedule). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/trigger/schedule/delete';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleDeleteInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleDeleteUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleDeleteForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleDeleteNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleDeleteTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleDeleteInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php b/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php
new file mode 100644
index 0000000..b746be6
--- /dev/null
+++ b/lib/Endpoint/PostCanvasTriggerScheduleUpdate.php
@@ -0,0 +1,129 @@
+ Use this endpoint to update scheduled API-triggered Canvases that were created in the dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.schedule.update` permission.
+ *
+ * This allows you to decide what action should trigger the message to be sent. You can pass in `trigger_properties` that will be templated into the message itself.
+ *
+ * Note that to send messages with this endpoint, you must have a Canvas ID, created when you build a [Canvas](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier).
+ *
+ * Any schedule will completely overwrite the one that you provided in the create schedule request or in previous update schedule requests. For example, if you originally provide `"schedule" : {"time" : "2015-02-20T13:14:47", "in_local_time" : true}` and then in your update you provide `"schedule" : {"time" : "2015-02-20T14:14:47"}`, your message will now be sent at the provided time in UTC, not in the user's local time. Scheduled triggers that are updated very close to or during the time they were supposed to be sent will be updated with best efforts, so last-second changes could be applied to all, some, or none of your targeted users.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `schedule_id` | Optional | String | The `schedule_id` to update (obtained from the response to create schedule). |
+ * | `schedule` | Required | Object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/trigger/schedule/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerScheduleUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerScheduleUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCanvasTriggerSend.php b/lib/Endpoint/PostCanvasTriggerSend.php
new file mode 100644
index 0000000..3fbbfaa
--- /dev/null
+++ b/lib/Endpoint/PostCanvasTriggerSend.php
@@ -0,0 +1,153 @@
+ Use this endpoint to send Canvas messages via API-triggered delivery.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `canvas.trigger.send` permission.
+ *
+ * API-triggered delivery allows you to house message content inside of the Braze dashboard while dictating when a message is sent, and to whom via your API.
+ *
+ * Note that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier) created when you build a Canvas.
+ *
+ * ## Rate limit
+ *
+ * When specifying a segment or Connected Audience in your request, we apply a rate limit of 250 requests per minute to this endpoint. Otherwise, if specifying an `external_id`, this endpoint has a default rate limit of 250,000 requests per hour, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific `external_ids`, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `canvas_id` | Required | String | See [Canvas identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `canvas_entry_properties` | Optional | Object | See [Canvas entry properties](https://www.braze.com/docs/api/objects_filters/canvas_entry_properties_object/). Personalization key-value pairs that will apply to all users in this request. The Canvas entry properties object has a maximum size limit of 50 KB. |
+ * | `broadcast` | Optional | Boolean | You must set `broadcast` to true when sending a message to an entire segment that a campaign or Canvas targets. This parameter defaults to false (as of August 31, 2017).
If `broadcast` is set to true, a recipients list cannot be included. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `audience` | Optional | Connected audience object | See [Connected audience](https://braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `recipients` | Optional | Array | See [Recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). If not provided and `broadcast` is set to true, the message will send to the entire segment targeted by the Canvas.
The `recipients` array may contain up to 50 objects, with each object containing a single `external_user_id` string and `canvas_entry_properties` object. Either `external_user_id` or user_alias is required for this call. Requests must specify only one.
When `send_to_existing_only` is true, Braze will only send the message to existing users—however this flag can’t be used with user aliases. When `send_to_existing_only` is `false` and a user with the given `id` does not exist, Braze will create a user with that ID and attributes before sending the message. |
+ *
+ * Customers using the API for server-to-server calls may need to whitelist the appropriate API URL if they’re behind a firewall.
+ *
+ * > **Note:** If you include both specific users in your API call and a target segment in the dashboard, the message will send to specifically the user profiles that are in the API call and qualify for the segment filters.
+ *
+ *
+ * ## Response details
+ *
+ * Message sending endpoint responses will include the message’s `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the ID of the message dispatch (unique ID for each “transmission” sent from the Braze platform). Check out [Dispatch ID behavior](https://www.braze.com/docs/help/help_articles/data/dispatch_id/) for more information.
+ *
+ * ## Create send endpoint
+ *
+ **Using the Attributes Object in Canvas**
+ *
+ * Braze has a Messaging Object called `Attributes` that allows you to add, create, or update attributes and values for a user before sending them an API-Triggered Canvas using the `canvas/trigger/send` endpoint as this API call will process the User Attributes object before it processes and sends the Canvas. This helps minimize the risk of there being issues caused by [race conditions](https://www.braze.com/docs/help/best_practices/race_conditions/).
+ *
+ * > **Important:** Looking for the camaigns version of this endpoint? Check out [Sending campaign messages via API-triggered delivery](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_campaigns/).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/canvas/trigger/send';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCanvasTriggerSendBadRequestException
+ * @throws \Braze\Exception\PostCanvasTriggerSendUnauthorizedException
+ * @throws \Braze\Exception\PostCanvasTriggerSendForbiddenException
+ * @throws \Braze\Exception\PostCanvasTriggerSendNotFoundException
+ * @throws \Braze\Exception\PostCanvasTriggerSendTooManyRequestsException
+ * @throws \Braze\Exception\PostCanvasTriggerSendInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerSendUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerSendForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerSendNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerSendTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCanvasTriggerSendInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCatalog.php b/lib/Endpoint/PostCatalog.php
new file mode 100644
index 0000000..68587ff
--- /dev/null
+++ b/lib/Endpoint/PostCatalog.php
@@ -0,0 +1,273 @@
+ Use this endpoint to create a catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.create` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalogs` | Required | Array | An array that contains catalog objects. Only one catalog object is allowed for this request. |
+ *
+ * ### Catalog object parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `name` | Required | String | The name of the catalog that you want to create. |
+ * | `description` | Required | String | The description of the catalog that you want to create. |
+ * | `fields` | Required | Array | An array of objects where the object contains keys `name` and `type`. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/catalogs' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "catalogs": [
+ * {
+ * "name": "restaurants",
+ * "description": "My Restaurants",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Name",
+ * "type": "string"
+ * },
+ * {
+ * "name": "City",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Cuisine",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Rating",
+ * "type": "number"
+ * },
+ * {
+ * "name": "Loyalty_Program",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "Created_At",
+ * "type": "time"
+ * }
+ * ]
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `201` and `400`.
+ *
+ * ### Example success response
+ *
+ * The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "catalogs": [
+ * {
+ * "description": "My Restaurants",
+ * "fields": [
+ * {
+ * "name": "id",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Name",
+ * "type": "string"
+ * },
+ * {
+ * "name": "City",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Cuisine",
+ * "type": "string"
+ * },
+ * {
+ * "name": "Rating",
+ * "type": "number"
+ * },
+ * {
+ * "name": "Loyalty_Program",
+ * "type": "boolean"
+ * },
+ * {
+ * "name": "Created_At",
+ * "type": "time"
+ * }
+ * ],
+ * "name": "restaurants",
+ * "num_items": 0,
+ * "updated_at": "2022-11-02T20:04:06.879+00:00"
+ * }
+ * ],
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "catalog-name-already-exists",
+ * "message": "A catalog with that name already exists",
+ * "parameters": [
+ * "name"
+ * ],
+ * "parameter_values": [
+ * "restaurants"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-array-invalid` | `catalogs` must be an array of objects. |
+ * | `catalog-name-already-exists` | Catalog with that name already exists. |
+ * | `catalog-name-too-large` | Character limit for a catalog name is 250. |
+ * | `description-too-long` | Character limit for description is 250. |
+ * | `field-names-not-unique` | The same field name is referenced twice. |
+ * | `field-names-too-large` | Character limit for a field name is 250. |
+ * | `id-not-first-column` | The `id` must be the first field in the array. Check that the type is a string. |
+ * | `invalid_catalog_name` | Catalog name can only include letters, numbers, hyphens, and underscores. |
+ * | `invalid-field-names` | Fields can only include letters, numbers, hyphens, and underscores. |
+ * | `invalid-field-types` | Make sure the field types are valid. |
+ * | `invalid-fields` | `fields` is not formatted correctly. |
+ * | `reached-company-catalogs-limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |
+ * | `too-many-catalog-atoms` | You can only create one catalog per request. |
+ * | `too-many-fields` | Number of fields limit is 30. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/catalogs';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCatalogBadRequestException
+ * @throws \Braze\Exception\PostCatalogUnauthorizedException
+ * @throws \Braze\Exception\PostCatalogForbiddenException
+ * @throws \Braze\Exception\PostCatalogNotFoundException
+ * @throws \Braze\Exception\PostCatalogTooManyRequestsException
+ * @throws \Braze\Exception\PostCatalogInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCatalogsByCatalogNameItem.php b/lib/Endpoint/PostCatalogsByCatalogNameItem.php
new file mode 100644
index 0000000..5b99ef4
--- /dev/null
+++ b/lib/Endpoint/PostCatalogsByCatalogNameItem.php
@@ -0,0 +1,229 @@
+ Use this endpoint to create multiple items in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.add_items` permission.
+ *
+ * Each request can support up to 50 items. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain all of the fields in the catalog. Up to 50 item objects are allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "id": "restaurant1",
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Created_At": "2022-11-01T09:03:19.967+00:00"
+ * },
+ * {
+ * "id": "restaurant2",
+ * "Name": "Restaurant2",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 10,
+ * "Loyalty_Program": true,
+ * "Created_At": "2022-11-02T09:03:19.967+00:00"
+ * },
+ * {
+ * "id": "restaurant3",
+ * "Name": "Restaurant3",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 3,
+ * "Loyalty_Program": false,
+ * "Created_At": "2022-11-03T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `202`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "fields-do-not-match",
+ * "message": "Fields do not match with fields on the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant2"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `ids-not-strings` | Item IDs must be of type string. |
+ * | `ids-not-unique` | Item IDs must be unique in the request. |
+ * | `ids-too-large` | Item IDs can't be more than 250 characters. |
+ * | `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |
+ * | `invalid-fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |
+ * | `item-array-invalid` | `items` must be an array of objects. |
+ * | `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |
+ * | `items-too-large` | Item values can't exceed 5,000 characters. |
+ * | `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |
+ * | `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable-to-coerce-value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}'], [$this->catalog_name], '/catalogs/{catalog_name}/items');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php b/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php
new file mode 100644
index 0000000..0e31918
--- /dev/null
+++ b/lib/Endpoint/PostCatalogsByCatalogNameItemByItemId.php
@@ -0,0 +1,214 @@
+ Use this endpoint to create an item in your catalog.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `catalogs.create_item` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain all of the fields in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example Request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "Name": "Restaurant1",
+ * "City": "New York",
+ * "Cuisine": "American",
+ * "Rating": 5,
+ * "Loyalty_Program": true,
+ * "Created_At": "2022-11-01T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `201`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "fields-do-not-match",
+ * "message": "Fields do not match with fields on the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant2"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `already-reached-catalog-item-limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |
+ * | `already-reached-company-item-limit` | Maximum number of catalog items reached. Contact your Braze account manager for more information. |
+ * | `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog-not-found` | Check that the catalog name is valid. |
+ * | `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |
+ * | `id-in-body` | Remove any item IDs in the request body. |
+ * | `ids-too-large` | Character limit for each item ID is 250 characters. |
+ * | `invalid-ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid-fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |
+ * | `item-already-exists` | The item already exists in the catalog. |
+ * | `item-array-invalid` | `items` must be an array of objects. |
+ * | `items-too-large` | Character limit for each item is 5,000 characters. |
+ * | `request-includes-too-many-items` | You can only create one catalog item per request. |
+ * | `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable-to-coerce-value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->item_id = $itemId;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}', '{item_id}'], [$this->catalog_name, $this->item_id], '/catalogs/{catalog_name}/items/{item_id}');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostCatalogsByCatalogNameItemByItemIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostContentBlocksCreate.php b/lib/Endpoint/PostContentBlocksCreate.php
new file mode 100644
index 0000000..577353f
--- /dev/null
+++ b/lib/Endpoint/PostContentBlocksCreate.php
@@ -0,0 +1,162 @@
+ Use this endpoint to create a [Content Block](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.create` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `name` | Required | String | Name of the content block. Must be less than 100 characters. |
+ * | `description` | Optional | String | Description of the content block. Must be less than 250 characters. |
+ * | `content` | Required | String | HTML or text content within the Content Block. |
+ * | `state` | Optional | String | Choose `active` or `draft`. Defaults to `active` if not specified. |
+ * | `tags` | Optional | Array of strings | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "content_block_id": (string) Your newly generated block id,
+ * "liquid_tag": (string) The generated block tag from the Content Block name,
+ * "created_at": (string) The time the Content Block was created in ISO 8601,
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Content cannot be blank` | |
+ * | `Content must be a string` | Make sure your content is encapsulated in quotes (`""`). |
+ * | `Content must be smaller than 50kb` | The content in your Content Block must be less than 50kb total. |
+ * | `Content contains malformed liquid` | The Liquid provided is not valid or parsable. Try again with valid Liquid or reach out to support. |
+ * | `Content Block cannot be referenced within itself` | |
+ * | `Content Block description cannot be blank` | |
+ * | `Content Block description must be a string` | Make sure your Content Block description is encapsulated in quotes (`""`). |
+ * | `Content Block description must be shorter than 250 characters` | |
+ * | `Content Block name cannot be blank` | |
+ * | `Content Block name must be shorter than 100 characters` | |
+ * | `Content Block name can only contain alphanumeric characters` | Content Block names can include any of the following characters: the letters (capitalized or lowercase) `A` through `Z`, the numbers `0` through `9`, dashes `-`, and underscores `_`. It cannot contain non-alphanumeric characters like emojis, `!`, `@`, `~`, `&`, and other "special" characters. |
+ * | `Content Block with this name already exists` | Try a different name. |
+ * | `Content Block state must be either active or draft` | |
+ * | `Tags must be an array` | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | `All tags must be strings` | Make sure your tags are encapsulated in quotes (`""`). |
+ * | `Some tags could not be found` | To add a tag when creating a Content Block, the tag must already exist in Braze. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/content_blocks/create';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostContentBlocksCreateBadRequestException
+ * @throws \Braze\Exception\PostContentBlocksCreateUnauthorizedException
+ * @throws \Braze\Exception\PostContentBlocksCreateForbiddenException
+ * @throws \Braze\Exception\PostContentBlocksCreateNotFoundException
+ * @throws \Braze\Exception\PostContentBlocksCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostContentBlocksCreateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksCreateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksCreateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksCreateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksCreateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksCreateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostContentBlocksUpdate.php b/lib/Endpoint/PostContentBlocksUpdate.php
new file mode 100644
index 0000000..e25de73
--- /dev/null
+++ b/lib/Endpoint/PostContentBlocksUpdate.php
@@ -0,0 +1,165 @@
+ Use this endpoint to update a [Content Block](https://www.braze.com/docs/user_guide/engagement_tools/templates_and_media/content_blocks/).
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `content_blocks.update` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/)
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `content_block_id` | Required | String | Your content block's API identifier. |
+ * | `name` | Required | String | Name of the content block. Must be less than 100 characters. |
+ * | `description` | Optional | String | Description of the content block. Must be less than 250 characters. |
+ * | `content` | Required | String | HTML or text content within content blocks. |
+ * | `state` | Optional | String | Choose `active` or `draft`. Defaults to `active` if not specified. |
+ * | `tags` | Optional | Array of strings | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "content_block_id": (string) Your newly generated block id,
+ * "liquid_tag": (string) The generated block tag from the Content Block name,
+ * "created_at": (string) The time the Content Block was created in ISO 8601,
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `Content cannot be blank` | |
+ * | `Content must be a string` | Make sure your content is encapsulated in quotes (`""`). |
+ * | `Content must be smaller than 50kb` | The content in your Content Block must be less than 50kb total. |
+ * | `Content contains malformed liquid` | The Liquid provided is not valid or parsable. Try again with valid Liquid or reach out to support. |
+ * | `Content Block cannot be referenced within itself` | |
+ * | `Content Block description cannot be blank` | |
+ * | `Content Block description must be a string` | Make sure your Content Block description is encapsulated in quotes (`""`). |
+ * | `Content Block description must be shorter than 250 characters` | |
+ * | `Content Block name cannot be blank` | |
+ * | `Content Block name must be shorter than 100 characters` | |
+ * | `Content Block name can only contain alphanumeric characters` | Content Block names can include any of the following characters: the letters (capitalized or lowercase) `A` through `Z`, the numbers `0` through `9`, dashes `-`, and underscores `_`. It cannot contain non-alphanumeric characters like emojis, `!`, `@`, `~`, `&`, and other "special" characters. |
+ * | `Content Block with this name already exists` | Try a different name. |
+ * | `Content Block name cannot be updated for active Content Blocks` | |
+ * | `Content Block state must be either active or draft` | |
+ * | `Active Content Block can not be updated to Draft. Create a new Content Block.` | |
+ * | `Tags must be an array` | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | `All tags must be strings` | Make sure your tags are encapsulated in quotes (`""`). |
+ * | `Some tags could not be found` | To add a tag when creating a Content Block, the tag must already exist in Braze. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/content_blocks/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostContentBlocksUpdateBadRequestException
+ * @throws \Braze\Exception\PostContentBlocksUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostContentBlocksUpdateForbiddenException
+ * @throws \Braze\Exception\PostContentBlocksUpdateNotFoundException
+ * @throws \Braze\Exception\PostContentBlocksUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostContentBlocksUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostContentBlocksUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostEmailBlacklist.php b/lib/Endpoint/PostEmailBlacklist.php
new file mode 100644
index 0000000..648c4c4
--- /dev/null
+++ b/lib/Endpoint/PostEmailBlacklist.php
@@ -0,0 +1,121 @@
+ Use this endpoint to unsubscribe a user from email and mark them as hard bounced.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.blacklist` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to blacklist, or an array of up to 50 email addresses to blocklist. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/blacklist';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostEmailBlacklistBadRequestException
+ * @throws \Braze\Exception\PostEmailBlacklistUnauthorizedException
+ * @throws \Braze\Exception\PostEmailBlacklistForbiddenException
+ * @throws \Braze\Exception\PostEmailBlacklistNotFoundException
+ * @throws \Braze\Exception\PostEmailBlacklistTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailBlacklistInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlacklistUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlacklistForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlacklistNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlacklistTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlacklistInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostEmailBlocklist.php b/lib/Endpoint/PostEmailBlocklist.php
new file mode 100644
index 0000000..fbb6b71
--- /dev/null
+++ b/lib/Endpoint/PostEmailBlocklist.php
@@ -0,0 +1,121 @@
+ Use this endpoint to unsubscribe a user from email and mark them as hard bounced.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.blacklist` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to blacklist, or an array of up to 50 email addresses to blocklist. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/blocklist';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostEmailBlocklistBadRequestException
+ * @throws \Braze\Exception\PostEmailBlocklistUnauthorizedException
+ * @throws \Braze\Exception\PostEmailBlocklistForbiddenException
+ * @throws \Braze\Exception\PostEmailBlocklistNotFoundException
+ * @throws \Braze\Exception\PostEmailBlocklistTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailBlocklistInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlocklistUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlocklistForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlocklistNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlocklistTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBlocklistInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostEmailBounceRemove.php b/lib/Endpoint/PostEmailBounceRemove.php
new file mode 100644
index 0000000..4860882
--- /dev/null
+++ b/lib/Endpoint/PostEmailBounceRemove.php
@@ -0,0 +1,123 @@
+ Use this endpoint to remove email addresses from your Braze bounce list.
+ *
+ * We will also remove them from the bounce list maintained by your email provider.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.bounce.remove` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to modify, or an array of up to 50 email addresses to modify. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/bounce/remove';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostEmailBounceRemoveBadRequestException
+ * @throws \Braze\Exception\PostEmailBounceRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostEmailBounceRemoveForbiddenException
+ * @throws \Braze\Exception\PostEmailBounceRemoveNotFoundException
+ * @throws \Braze\Exception\PostEmailBounceRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailBounceRemoveInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBounceRemoveUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBounceRemoveForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBounceRemoveNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBounceRemoveTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailBounceRemoveInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostEmailSpamRemove.php b/lib/Endpoint/PostEmailSpamRemove.php
new file mode 100644
index 0000000..abab6c0
--- /dev/null
+++ b/lib/Endpoint/PostEmailSpamRemove.php
@@ -0,0 +1,123 @@
+ Use this endpoint to remove email addresses from your Braze spam list.
+ *
+ * We will also remove them from the spam list maintained by your email provider.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.spam.remove` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to modify, or an array of up to 50 email addresses to modify. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/spam/remove';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostEmailSpamRemoveBadRequestException
+ * @throws \Braze\Exception\PostEmailSpamRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostEmailSpamRemoveForbiddenException
+ * @throws \Braze\Exception\PostEmailSpamRemoveNotFoundException
+ * @throws \Braze\Exception\PostEmailSpamRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailSpamRemoveInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailSpamRemoveUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailSpamRemoveForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailSpamRemoveNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailSpamRemoveTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailSpamRemoveInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostEmailStatus.php b/lib/Endpoint/PostEmailStatus.php
new file mode 100644
index 0000000..f306934
--- /dev/null
+++ b/lib/Endpoint/PostEmailStatus.php
@@ -0,0 +1,124 @@
+ Use this endpoint to set the email subscription state for your users. Users can be `opted_in`, `unsubscribed`, or `subscribed` (not specifically opted in or out).
+ *
+ * You can set the email subscription state for an email address that is not yet associated with any of your users within Braze. When that email address is subsequently associated with a user, the email subscription state that you uploaded will be automatically set.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `email.status` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email` | Required | String or array | String email address to modify, or an array of up to 50 email addresses to modify. |
+ * | `subscription_state` | Required | String | Either “subscribed”, “unsubscribed”, or “opted_in”. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/email/status';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostEmailStatusBadRequestException
+ * @throws \Braze\Exception\PostEmailStatusUnauthorizedException
+ * @throws \Braze\Exception\PostEmailStatusForbiddenException
+ * @throws \Braze\Exception\PostEmailStatusNotFoundException
+ * @throws \Braze\Exception\PostEmailStatusTooManyRequestsException
+ * @throws \Braze\Exception\PostEmailStatusInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailStatusUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailStatusForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailStatusNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailStatusTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostEmailStatusInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostMessagesLiveActivityUpdate.php b/lib/Endpoint/PostMessagesLiveActivityUpdate.php
new file mode 100644
index 0000000..faa468a
--- /dev/null
+++ b/lib/Endpoint/PostMessagesLiveActivityUpdate.php
@@ -0,0 +1,162 @@
+ Use this endpoint to update and end [Live Activities](https://www.braze.com/docs/developer_guide/platform_integration_guides/swift/live_activities/live_activities/) displayed by your iOS app. This endpoint requires additional setup.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.live_activity.update` permission.
+ *
+ * Before using this endpoint, you must register an activity with the Braze Swift SDK using the [`launchActivity`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/liveactivities-swift.class/launchactivity(pushtokentag:activity:fileid:line:)) method. Required request parameters will be defined during this step. Refer to [Live Activities](https://www.braze.com/docs/developer_guide/platform_integration_guides/swift/live_activities/live_activities/) for more information on registration.
+ *
+ * Once you have registered your activity, pass a JSON payload with updates to the Apple Push Notification service (APNs) through this endpoint. See Apple’s documentation on [updating your Live Activity with push notification payloads](https://developer.apple.com/documentation/activitykit/updating-and-ending-your-live-activity-with-activitykit-push-notifications) for more information.
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `app_id` | Required | String | App [API identifier]({{site.baseurl}}/api/identifier_types/#the-app-identifier) retrieved from **Settings > Setup and Testing > API Keys.** |
+ * | `activity_id` | Required | String | When you register your Live Activity using [`launchActivity`](https://braze-inc.github.io/braze-swift-sdk/documentation/brazekit/braze/liveactivities-swift.class), you use the `pushTokenTag` parameter to name the Activity's push token to a custom string.
Set `activity_id` to this custom string to define which Live Activity you want to update. |
+ * | `content_state` | Required | Object | You define the `ContentState` parameters when you create your Live Activity. Pass the updated values for your `ContentState` using this object.
The format of this request must match the shape you initially defined. |
+ * | `end_activity` | Optional | Boolean | If `true`, this request ends the Live Activity. |
+ * | `dismissal_date` | Optional | Datetime
([ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) string) | This parameter defines the time to remove the Live Activity from the user's UI. If this time is in the past, the Live Activity will be removed immediately. |
+ * | `stale_date` | Optional | Datetime
([ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) string) | This parameter tells the system when the Live Activity content is marked as outdated in the user's UI. |
+ * | `notification` | Optional | Object |
Include an [`apple_push`]({{site.baseurl}}/api/objects_filters/messaging/apple_object/) object to define a push notification. This behavior of this push notification depends on if the user is active or if the user is using a proxy device. {::nomarkdown}
If a notification
is included and the user is active on their iPhone when the update is delivered, the updated Live Activity UI will slide down and display like a push notification.
If a notification
is included and the user is not active on their iPhone, their screen will light up to display the updated Live Activity UI on their lock screen.
The notification alert
will not display as a standard push notification. Additionally, if a user has a proxy device, like an Apple Watch, the alert
will be displayed there.
|
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `201` and `4XX`.
+ *
+ * ### Example success response
+ *
+ * A `201` status code is returned if the request was formatted correctly and we received the request. The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The `4XX` class of status code indicates a client error. Refer to the [API errors and responses article]({{site.baseurl}}/api/errors/) for more information about errors you may encounter.
+ *
+ * The status code `400` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "error": "\nProblem:\n message body does not match declared format\nResolution:\n when specifying application/json as content-type, you must pass valid application/json in the request's 'body' "
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/messages/live_activity/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateBadRequestException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateForbiddenException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateNotFoundException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesLiveActivityUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesLiveActivityUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesLiveActivityUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesLiveActivityUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesLiveActivityUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesLiveActivityUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostMessagesScheduleCreate.php b/lib/Endpoint/PostMessagesScheduleCreate.php
new file mode 100644
index 0000000..c59b6a1
--- /dev/null
+++ b/lib/Endpoint/PostMessagesScheduleCreate.php
@@ -0,0 +1,135 @@
+ Use this endpoint to schedule a campaign, Canvas, or other message to be sent at a designated time (up to 90 days in the future) and provides you with an identifier to reference that message for updates.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule.create` permission.
+ *
+ * If you are targeting a segment, a record of your request will be stored in the [Developer Console](https://dashboard.braze.com/app_settings/developer_console/activitylog/) after all scheduled messages have been sent.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific external_ids, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your message to a larger than expected audience. |
+ * | `external_user_ids` | Optional | Array of strings | See [external user identifier](https://www.braze.com/docs/api/parameters/#external-user-id). |
+ * | `user_aliases` | Optional | Array of user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `segment_id` | Optional | String | See [segment identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `campaign_id` | Required | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `recipients` | Optional | Array of recipients objects | See [recipients object](https://www.braze.com/docs/api/objects_filters/recipient_object/). |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `override_messaging_limits` | Optional | Boolean | Ignore global rate limits for campaigns, defaults to false |
+ * | `recipient_subscription_state` | Optional | String | Use this to send messages to only users who have opted in (`opted_in`), only users who have subscribed or are opted in (`subscribed`) or to all users, including unsubscribed users (`all`).
Using `all` users is useful for transactional email messaging. Defaults to `subscribed`. |
+ * | `schedule` | Required | Schedule object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/) |
+ * | `messages` | Optional | Messaging object | See available [messaging objects](https://www.braze.com/docs/api/objects_filters/#messaging-objects). |
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * ``` json
+ * {
+ * "dispatch_id": (string) the dispatch identifier,
+ * "schedule_id": (string) the schedule identifier,
+ * "message": "success"
+ * }
+ *
+ * ```
+ */
+ public function __construct(\stdClass $requestBody = null)
+ {
+ $this->body = $requestBody;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/messages/schedule/create';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostMessagesScheduleCreateBadRequestException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateForbiddenException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateNotFoundException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesScheduleCreateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleCreateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleCreateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleCreateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleCreateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleCreateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostMessagesScheduleDelete.php b/lib/Endpoint/PostMessagesScheduleDelete.php
new file mode 100644
index 0000000..1e4ee60
--- /dev/null
+++ b/lib/Endpoint/PostMessagesScheduleDelete.php
@@ -0,0 +1,121 @@
+ Use this endpoint to cancel a message that you previously scheduled before it has been sent.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule.delete` permission.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `schedule_id` | Required | String | The schedule_id to delete (obtained from the response to create schedule). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/messages/schedule/delete';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteBadRequestException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteForbiddenException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteNotFoundException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesScheduleDeleteInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleDeleteUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleDeleteForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleDeleteNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleDeleteTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleDeleteInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostMessagesScheduleUpdate.php b/lib/Endpoint/PostMessagesScheduleUpdate.php
new file mode 100644
index 0000000..5e614e0
--- /dev/null
+++ b/lib/Endpoint/PostMessagesScheduleUpdate.php
@@ -0,0 +1,125 @@
+ Use this endpoint to update scheduled messages.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.schedule.update` permission.
+ *
+ * This endpoint accepts updates to either the `schedule` or `messages` parameter or both. Your request must contain at least one of those two keys.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `schedule_id` | Required | String | The `schedule_id` to update (obtained from the response to create schedule). |
+ * | `schedule` | Optional | Object | See [schedule object](https://www.braze.com/docs/api/objects_filters/schedule_object/). |
+ * | `messages` | Optional | Object | See available [message objects](https://www.braze.com/docs/api/objects_filters/#messaging-objects). |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/messages/schedule/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateBadRequestException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateForbiddenException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateNotFoundException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesScheduleUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesScheduleUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostMessagesSend.php b/lib/Endpoint/PostMessagesSend.php
new file mode 100644
index 0000000..a286c19
--- /dev/null
+++ b/lib/Endpoint/PostMessagesSend.php
@@ -0,0 +1,145 @@
+ Use this endpoint to send immediate, ad-hoc messages to designated users via the Braze API.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `messages.send` permission.
+ *
+ * Be sure to include Messaging Objects in your body to complete your requests.
+ *
+ * If you are targeting a segment, a record of your request will be stored in the [Developer Console](https://dashboard.braze.com/app_settings/developer_console/activitylog/).
+ *
+ * ## Rate limit
+ *
+ * When specifying a segment or Connected Audience in your request, we apply a rate limit of 250 requests per minute to this endpoint. Otherwise, if specifying an `external_id`, this endpoint has a default rate limit of 250,000 requests per hour, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * Braze endpoints support [batching API requests](https://www.braze.com/docs/api/api_limits/#batching-api-requests). A single request to the messaging endpoints can reach any of the following:
+ *
+ * - Up to 50 specific `external_ids`, each with individual message parameters
+ * - A segment of any size created in the Braze dashboard, specified by its `segment_id`
+ * - An ad-hoc audience segment of any size, defined in the request as a [Connected Audience](https://www.braze.com/docs/api/objects_filters/connected_audience/) object
+ *
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `broadcast` | Optional | Boolean | See [broadcast](https://www.braze.com/docs/api/parameters/#broadcast). This parameter defaults to false (as of August 31, 2017).
If `recipients` is omitted, `broadcast` must be set to true. However, use caution when setting `broadcast: true`, as unintentionally setting this flag may cause you to send your messages to a larger than expected audience. |
+ * | `external_user_ids` | Optional | Array of strings | See [external user ID](https://www.braze.com/docs/api/parameters/#external-user-id). |
+ * | `user_aliases` | Optional | Array of user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/). |
+ * | `segment_id` | Optional | String | See [segment identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `audience` | Optional | Connected audience object | See [connected audience](https://www.braze.com/docs/api/objects_filters/connected_audience/). |
+ * | `campaign_id` | Optional\* | String | See [campaign identifier](https://www.braze.com/docs/api/identifier_types/) for more information.
\*Required if you wish to track campaign stats (e.g. sends, clicks, bounces, etc) on the Braze dashboard. |
+ * | `send_id` | Optional | String | See [send identifier](https://www.braze.com/docs/api/identifier_types/) |
+ * | `override_frequency_capping` | Optional | Boolean | Ignore \`frequency_capping\` for campaigns, defaults to false. |
+ * | `recipient_subscription_state` | Optional | String | Use this to send messages to only users who have opted in (`opted_in`), only users who have subscribed or are opted in (`subscribed`) or to all users, including unsubscribed users (`all`).
Using `all` users is useful for transactional email messaging. Defaults to `subscribed`. |
+ * | `messages` | Optional | Messaging objects | See available [messaging objects](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_messages/#available-messaging-objects). |
+ *
+ * ## Response details
+ *
+ * Message sending endpoint responses will include the message’s `dispatch_id` for reference back to the dispatch of the message. The `dispatch_id` is the id of the message dispatch (unique id for each ‘transmission’ sent from the Braze platform). For more, information refer to [Dispatch ID behavior](https://www.braze.com/docs/help/help_articles/data/dispatch_id/).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/messages/send';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostMessagesSendBadRequestException
+ * @throws \Braze\Exception\PostMessagesSendUnauthorizedException
+ * @throws \Braze\Exception\PostMessagesSendForbiddenException
+ * @throws \Braze\Exception\PostMessagesSendNotFoundException
+ * @throws \Braze\Exception\PostMessagesSendTooManyRequestsException
+ * @throws \Braze\Exception\PostMessagesSendInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesSendUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesSendForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesSendNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesSendTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostMessagesSendInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostPreferenceCenterV1.php b/lib/Endpoint/PostPreferenceCenterV1.php
new file mode 100644
index 0000000..43c46f2
--- /dev/null
+++ b/lib/Endpoint/PostPreferenceCenterV1.php
@@ -0,0 +1,162 @@
+ Use this endpoint to create a preference center to allow users to manage their notification preferences for email campaigns.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.update` permission.
+ *
+ * Check out [Creating a preference center via API](https://www.braze.com/docs/user_guide/message_building_by_channel/email/preference_center/) for details on how to include this in your email campaigns.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 10 requests per minute, per workspace.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `name` | Required | String | The name of the preference center that meets the following requirements:
\- Only contains letters, numbers, hyphens, and underscores
\- Does not have spaces |
+ * | `preference_center_title` | Optional | String | The title for the preference center and confirmation pages. If a title is not specified, the title of the pages will default to "Preference Center". |
+ * | `preference_center_page_html` | Required | String | The HTML for the preference center page. |
+ * | `confirmation_page_html` | Required | String | The HTML for the confirmation page. |
+ * | `state` | Optional | String | Choose `active` or `draft`. Defaults to `active` if not specified. |
+ * | `options` | Optional | Object | Attributes: `meta-viewport-content`. When present, a `viewport` meta tag will be added to the page with `content=` . |
+ *
+ * > **Note:** The preference center name can't be edited once created.
+ *
+ *
+ * ### Liquid tags
+ *
+ * Refer to the following Liquid tags that can be included in your HTML to generate a user's subscription state on the preference center page.
+ *
+ * #### User subscription state
+ *
+ * | Liquid | Description |
+ * | --- | --- |
+ * | `{{subscribed_state.${email_global}}}` | Get the global email subscribed state for the user (i.e., "opted_in", "subscribed", or "unsubscribed". |
+ * | `{{subscribed_state.${}}}` | Get the subscribed state of the specified subscription group for the user (i.e., "subscribed" or "unsubscribed"). |
+ *
+ * #### Form inputs and action
+ *
+ * | Liquid | Description |
+ * | --- | --- |
+ * | `{% form_field_name :email_global_state %}` | Indicates that a specific form input element corresponds to the user's global email subscribed state. The user's selection state should be "opted_in", "subscribed", or "unsubscribed" when the form is submitted with selection data for the global email subscribed state. If it's a checkbox, the user will either be "opted_in" or "unsubscribed". For a hidden input, the "subscribed" state will also be valid. |
+ * | `{% form_field_name :subscription_group %}` | Indicates that a specific form input element corresponds to a given subscription group. The user's selection state should be either "subscribed" or "unsubscribed" when the form is submitted with selection data for a specific subscription group. |
+ * | `{{preference_center_submit_url}}` | Generates URL for form submission. |
+ *
+ * ## Example response
+ *
+ * ```
+ * {
+ * "preference_center_api_id": "preference_center_api_id_example",
+ * "liquid_tag": "{{preference_center.${MyPreferenceCenter2022-09-22}}}",
+ * "created_at": "2022-09-22T18:28:07+00:00",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/preference_center/v1';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostPreferenceCenterV1BadRequestException
+ * @throws \Braze\Exception\PostPreferenceCenterV1UnauthorizedException
+ * @throws \Braze\Exception\PostPreferenceCenterV1ForbiddenException
+ * @throws \Braze\Exception\PostPreferenceCenterV1NotFoundException
+ * @throws \Braze\Exception\PostPreferenceCenterV1TooManyRequestsException
+ * @throws \Braze\Exception\PostPreferenceCenterV1InternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostPreferenceCenterV1UnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostPreferenceCenterV1ForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostPreferenceCenterV1NotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostPreferenceCenterV1TooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostPreferenceCenterV1InternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostScimV2User.php b/lib/Endpoint/PostScimV2User.php
new file mode 100644
index 0000000..4131266
--- /dev/null
+++ b/lib/Endpoint/PostScimV2User.php
@@ -0,0 +1,177 @@
+ This endpoint allows you to create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).
+ *
+ * For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, and DELETE endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data type | Description |
+ * | --- | --- | --- | --- |
+ * | `schemas` | Required | Array of strings | Expected SCIM 2.0 schema name for user object. |
+ * | `userName` | Required | String | The user’s email address. |
+ * | `name` | Required | JSON object | This object contains the user's given name and family name. |
+ * | `department` | Required | String | Valid department string from the [department string documentation]({{site.baseurl}}/scim_api_appendix/#department-strings). |
+ * | `permissions` | Required | JSON object | Permissions object as described in the [permissions object documentation]({{site.baseurl}}/scim_api_appendix/#permissions-object). |
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "userName": "user@test.com",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "2519dafcdba238ae7",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["basic_access","export_user_data"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * ### Error states
+ *
+ * If a user with this email address already exists in Braze, the endpoint will respond with:
+ *
+ * ``` json
+ * HTTP/1.1 409 Conflict
+ * Date: Tue, 10 Sep 2019 02:22:30 GMT
+ * Content-Type: text/json;charset=UTF-8
+ * {
+ * "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
+ * "detail": "User already exists in the database.",
+ * "status": 409
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/scim/v2/Users';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'X-Request-Origin', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('X-Request-Origin', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostScimV2UserBadRequestException
+ * @throws \Braze\Exception\PostScimV2UserUnauthorizedException
+ * @throws \Braze\Exception\PostScimV2UserForbiddenException
+ * @throws \Braze\Exception\PostScimV2UserNotFoundException
+ * @throws \Braze\Exception\PostScimV2UserTooManyRequestsException
+ * @throws \Braze\Exception\PostScimV2UserInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostScimV2UserUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostScimV2UserForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostScimV2UserNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostScimV2UserTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostScimV2UserInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostSendsIdCreate.php b/lib/Endpoint/PostSendsIdCreate.php
new file mode 100644
index 0000000..2e0403d
--- /dev/null
+++ b/lib/Endpoint/PostSendsIdCreate.php
@@ -0,0 +1,138 @@
+ Use this endpoint to create send IDs that can be used to send messages and track message performance programatically, without campaign creation for each send.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sends.id.create` permission.
+ *
+ * Using the send identifier to track and send messages is useful if you are planning to programmatically generate and send content.
+ *
+ * ## Rate limit
+ *
+ * The daily maximum number of custom send identifiers that can be created via this endpoint is 100 for a given app group. Each `send_id` and `campaign_id` combination that you create will count towards your daily limit. The response headers for any valid request include the current rate limit status, see [API rate limits](https://www.braze.com/docs/api/api_limits/) for details.
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | See [campaign identifier]({{site.baseurl}}/api/identifier_types/). |
+ * | `send_id` | Optional | String | See [send identifier]({{site.baseurl}}/api/identifier_types/). |
+ *
+ * ## Response
+ *
+ * ### Example success response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": "success",
+ * "send_id" : (string) the send identifier
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/sends/id/create';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostSendsIdCreateBadRequestException
+ * @throws \Braze\Exception\PostSendsIdCreateUnauthorizedException
+ * @throws \Braze\Exception\PostSendsIdCreateForbiddenException
+ * @throws \Braze\Exception\PostSendsIdCreateNotFoundException
+ * @throws \Braze\Exception\PostSendsIdCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostSendsIdCreateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSendsIdCreateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSendsIdCreateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSendsIdCreateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSendsIdCreateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSendsIdCreateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php b/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php
new file mode 100644
index 0000000..cbf6f57
--- /dev/null
+++ b/lib/Endpoint/PostSmsInvalidPhoneNumbersRemove.php
@@ -0,0 +1,123 @@
+ Use this endpoint to remove “invalid” phone numbers from Braze’s invalid list.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `sms.invalid_phone_numbers.remove` permission.
+ *
+ * This can be used to re-validate phone numbers after they have been marked as invalid.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `phone_number` | Required | Array of strings in e.164 format | An array of up to 50 phone numbers to modify. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Authorization
+ * @var string $Content-Type
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/sms/invalid_phone_numbers/remove';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Authorization', 'Content-Type']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveBadRequestException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveForbiddenException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveNotFoundException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSmsInvalidPhoneNumbersRemoveInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostSubscriptionStatusSet.php b/lib/Endpoint/PostSubscriptionStatusSet.php
new file mode 100644
index 0000000..a1aee67
--- /dev/null
+++ b/lib/Endpoint/PostSubscriptionStatusSet.php
@@ -0,0 +1,143 @@
+ Use this endpoint to batch update the subscription state of up to 50 users on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.status.set` permission.
+ *
+ * You can access a subscription group’s `subscription_group_id` by navigating to the **Subscription Group** page.
+ *
+ * Tip: When creating new users via the [/users/track](https://www.braze.com/docs/api/endpoints/user_data/post_user_track/) endpoint, you can set subscription groups within the user attributes object, which allows you to create a user and set the subscription group state in one API call.
+ *
+ * \*Only `external_id` or `phone` is accepted for SMS subscription groups.
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after January 6, 2022, we apply a rate limit of 5,000 requests per minute shared across the `/subscription/status/set` and `/v2/subscription/status/set` endpoint as documented in [API rate limits](http://localhost:4000/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `subscription_group_id` | Required | String | The `id` of your subscription group. |
+ * | `subscription_state` | Required | String | Available values are `unsubscribed` (not in subscription group) or `subscribed` (in subscription group). |
+ * | `external_id` | Required\* | Array of strings | The `external_id` of the user or users, may include up to 50 `id`s. |
+ * | `phone` | Required\* | String in [E.164](https://en.wikipedia.org/wiki/E.164) format | The phone number of the user, can be passed as an array of strings. Must include at least one phone number (with a max of 50). |
+ *
+ * ### Example successful response
+ *
+ * The status code `201` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * Important: The endpoint only accepts the `email` or `phone` value, not both. If given both, you will receive this response: `{"message":"Either an email address or a phone number should be provided, but not both."}`
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/subscription/status/set';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostSubscriptionStatusSetBadRequestException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetUnauthorizedException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetForbiddenException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetNotFoundException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetTooManyRequestsException
+ * @throws \Braze\Exception\PostSubscriptionStatusSetInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSubscriptionStatusSetUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSubscriptionStatusSetForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSubscriptionStatusSetNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSubscriptionStatusSetTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostSubscriptionStatusSetInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostTemplatesEmailCreate.php b/lib/Endpoint/PostTemplatesEmailCreate.php
new file mode 100644
index 0000000..4543ef8
--- /dev/null
+++ b/lib/Endpoint/PostTemplatesEmailCreate.php
@@ -0,0 +1,144 @@
+ Use this endpoint to create email templates on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.create` permission.
+ *
+ * These templates will be available on the **Templates & Media** page. The response from this endpoint will include a field for `email_template_id`, which can be used to update the template in subsequent API calls.
+ *
+ * Users’ email subscription status can be updated and retrieved via Braze using a RESTful API. You can use the API to set up bi-directional sync between Braze and other email systems or your own database. All API requests are made over HTTPS.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `template_name` | Required | String | Name of your email template. |
+ * | `subject` | Required | String | Email template subject line. |
+ * | `body` | Required | String | Email template body that may include HTML. |
+ * | `plaintext_body` | Optional | String | A plaintext version of the email template body. |
+ * | `preheader` | Optional | String | Email preheader used to generate previews in some clients. |
+ * | `tags` | Optional | String | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ * | `should_inline_css` | Optional | Boolean | Enables or disables the `inline_css` feature per template. If not provided, Braze will use the default setting for the app group. One of `true` or `false` is expected. |
+ *
+ * ### Possible errors
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps, if applicable.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | Template name is required | Enter a template name. |
+ * | Tags must be an array | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | All tags must be strings | Make sure your tags are encapsulated in quotes (`""`). |
+ * | Some tags could not be found | To add a tag when creating an email template, the tag must already exist in Braze. |
+ * | Email must have valid Content Block names | The email contains Content Blocks that don't exist in this environment. |
+ * | Invalid value for `should_inline_css`. One of `true` or `false` was expected | This parameter only accepts boolean values (true or false). Make sure the value for `should_inline_css` is not encapsulated in quotes (`""`), which causes the value to be sent as a string instead. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/templates/email/create';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostTemplatesEmailCreateBadRequestException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateUnauthorizedException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateForbiddenException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateNotFoundException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateTooManyRequestsException
+ * @throws \Braze\Exception\PostTemplatesEmailCreateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailCreateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailCreateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailCreateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailCreateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailCreateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostTemplatesEmailUpdate.php b/lib/Endpoint/PostTemplatesEmailUpdate.php
new file mode 100644
index 0000000..199bd2a
--- /dev/null
+++ b/lib/Endpoint/PostTemplatesEmailUpdate.php
@@ -0,0 +1,144 @@
+ Use this endpoint to update email templates on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `templates.email.update` permission.
+ *
+ * You can access an email template’s `email_template_id` by navigating to it on the **Templates & Media** page. The [Create email template endpoint](https://www.braze.com/docs/api/endpoints/templates/email_templates/post_create_email_template/) will also return an `email_template_id` reference.
+ *
+ * All fields other than the `email_template_id` are optional, but you must specify at least one field to update.
+ *
+ * ### Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `email_template_id` | Required | String | Your [email template's API identifier](https://www.braze.com/docs/api/identifier_types/). |
+ * | `template_name` | Optional | String | Name of your email template. |
+ * | `subject` | Optional | String | Email template subject line. |
+ * | `body` | Optional | String | Email template body that may include HTML. |
+ * | `plaintext_body` | Optional | String | A plaintext version of the email template body. |
+ * | `preheader` | Optional | String | Email preheader used to generate previews in some clients. |
+ * | `tags` | Optional | String | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |
+ * | `should_inline_css` | Optional | Boolean | Enables or disables the `inline_css` feature per template. If not provided, Braze will use the default setting for the AppGroup. One of `true` or `false` is expected. |
+ *
+ * ### Possible errors
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps, if applicable.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | Template name is required | |
+ * | Tags must be an array | Tags must be formatted as an array of strings, for example `["marketing", "promotional", "transactional"]`. |
+ * | All tags must be strings | Make sure your tags are encapsulated in quotes (`""`). |
+ * | Some tags could not be found | To add a tag when creating an email template, the tag must already exist in Braze. |
+ * | Invalid value for `should_inline_css`. One of `true` or `false` was expected | This parameter only accepts boolean values (true or false). Make sure the value for `should_inline_css` is not encapsulated in quotes (`""`), which causes the value to be sent as a string instead. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/templates/email/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateBadRequestException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateForbiddenException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateNotFoundException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostTemplatesEmailUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTemplatesEmailUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php b/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php
new file mode 100644
index 0000000..dda2c72
--- /dev/null
+++ b/lib/Endpoint/PostTransactionalV1CampaignsByCampaignIdSend.php
@@ -0,0 +1,313 @@
+ Use this endpoint to send immediate, ad-hoc transactional messages to a designated user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `transactional.send` permission.
+ *
+ * This endpoint is used alongside the creation of a [Transactional Email campaign](https://www.braze.com/docs/api/api_campaigns/transactional_campaigns) and corresponding campaign ID.
+ *
+ * > **Important:** Transactional Email is currently available as part of select Braze packages. Reach out to your Braze customer success manager for more details.
+ *
+ *
+ * Similar to the [Send triggered campaign endpoint](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_triggered_campaigns/), this campaign type allows you to house message content inside of the Braze dashboard while dictating when and to whom a message is sent via your API. Unlike the Send triggered campaign endpoint, which accepts an audience or segment to send messages to, a request to this endpoint must specify a single user either by `external_user_id` or `user_alias`, as this campaign type is purpose-built for 1:1 messaging of alerts like order confirmations or password resets.
+ *
+ * ## Rate limit
+ *
+ * Transactional Emails are not subject to a rate limit. Depending on your chosen package, a set number of Transactional Emails is covered per hour by SLA. Requests that exceed that rate will still send, but are not covered by SLA. 99.9% of emails will send in less than one minute.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `campaign_id` | Required | String | ID of the campaign |
+ *
+ * ## Request Parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_send_id` | Optional | String | A Base64 compatible string. Validated against the following regex `/^[a-zA-Z0-9-_+\/=]+$/`. This optional field allows you to pass an internal identifier for this particular send which will be included in events sent from the Transactional HTTP event postback. When passed, this identifier will also be used as a deduplication key, which Braze will store for 24 hours. Passing the same identifier in another request will not result in a new instance of a send by Braze for 24 hours. |
+ * | `trigger_properties` | Optional | Object | See [trigger properties](https://www.braze.com/docs/api/objects_filters/trigger_properties_object/). Personalization key-value pairs that will apply to the user in this request. |
+ * | `recipients` | Required | Object | The user you are targeting this message to. Can contain `attributes` and a single `external_user_id` or `user_alias`.
Note that if you provide an external user ID that doesn’t already exist in Braze, passing any fields to the `attributes` object will create this user profile in Braze and send this message to the newly created user.
If you send multiple requests to the same user with different data in the `attributes` object, Braze will ensure that `first_name`, `last_name`, and `email` attributes will be updated synchronously and templated into your message. Custom attributes don’t have this same protection, so proceed with caution when updating a user through this API and passing different custom attribute values in quick succession. |
+ *
+ * ## Response
+ *
+ * The send transactional email endpoint will respond with the message’s `dispatch_id` which represents the instance of this message send. This identifier can be used along with events from the Transactional HTTP event postback to trace the status of an individual email sent to a single user.
+ *
+ * ### Example response
+ *
+ * ``` json
+ * {
+ * "dispatch_id": Out-of-the-box generated Unique ID of the instance of this send
+ * "status": Current status of the message
+ * "metadata": Object containing additional information about the send instance
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The endpoint may also return an error code and a human-readable message in some cases, most of which are validation errors. Here are some common errors you may get when making invalid requests.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `The campaign is not a transactional campaign. Only transactional campaigns may use this endpoint` | The campaign ID provided is not for a transactional campaign. |
+ * | `The external reference has been queued. Please retry to obtain send_id.` | The external_send_id has been created recently, try a new external_send_id if you are intending to send a new message. |
+ * | `Campaign does not exist` | The campaign ID provided does not correspond to an existing campaign. |
+ * | `The campaign is archived. Unarchive the campaign to ensure trigger requests will take effect.` | The campaign ID provided corresponds to an archived campaign. |
+ * | `The campaign is paused. Resume the campaign to ensure trigger requests will take effect.` | The campaign ID provided corresponds to a paused campaign. |
+ * | `campaign_id must be a string of the campaign api identifier` | The campaign ID provided is not a valid format. |
+ * | `Error authenticating credentials` | The API key provided is invalid |
+ * | `Invalid whitelisted IPs` | The IP address sending the request is not on the IP whitelist (if it is being utilized) |
+ * | `You do not have permission to access this resource` | The API key used does not have permission to take this action |
+ *
+ * Most endpoints at Braze have a rate limit implementation that will return a 429 response code if you have made too many requests. The transactional sending endpoint works differently -- if you exceed your allotted rate limit, our system will continue to ingest the API calls, return success codes, and send the messages, however those messages may not be subject to the contractual SLA for the feature. Please reach out if you need more information about this functionality.
+ *
+ * ## Transactional HTTP Event Postback
+ *
+ * All transactional emails are complemented with event status postbacks sent as an HTTP request back to your specified URL. This will allow you to evaluate the message status in real-time and take action to reach the user on another channel if the message goes undelivered, or fallback to an internal system if Braze is experiencing latency.
+ *
+ * In order to associate the incoming events to a particular instance of send, you can choose to either capture and store the Braze `dispatch_id` returned in the [API response](https://www.braze.com/docs/api/endpoints/messaging/send_messages/post_send_transactional_message/#example-response), or pass your own identifier to the `external_send_id` field. An example of a value you may choose to pass to that field may be an order ID, where after completing order 1234, an order confirmation message is triggered to the user through Braze, and `external_send_id : 1234` is included in the request. All following event postbacks such as `Sent` and `Delivered` will include `external_send_id : 1234` in the payload allowing you to confirm that user successfully received their order confirmation email.
+ *
+ * To get started using the Transactional HTTP Event Postback, navigate to **Settings** > **Workspace Settings** > **Email Preferences**. in your Braze dashboard and input your desired URL to receive postbacks.
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), **Email Preferences** can be found at ****Manage Settings** > **Email Settings****.
+ *
+ * ### Postback body
+ *
+ * ``` json
+ * // Sent Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "sent",
+ * "metadata": {
+ * "received_at": "2020-08-31T18:58:41.000+00:00",
+ * "enqueued_at": "2020-08-31T18:58:41.000+00:00",
+ * "executed_at": "2020-08-31T18:58:41.000+00:00",
+ * "sent_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Processed Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "processed",
+ * "metadata": {
+ * "processed_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Aborted
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "aborted",
+ * "metadata": {
+ * "reason": "User not emailable",
+ * "aborted_at": "2020-08-31T19:04:51.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Delivered Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "delivered",
+ * "metadata": {
+ * "delivered_at": "2020-08-31T18:27:32.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Bounced Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "bounced",
+ * "metadata": {
+ * "bounced_at": "2020-08-31T18:58:43.000+00:00",
+ * "reason": "550 5.1.1 The email account that you tried to reach does not exist",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ *
+ * ```
+ *
+ * #### Message status
+ *
+ * | **Status** | **Description** |
+ * | --- | --- |
+ * | `sent` | Message successfully dispatched to Braze’s email sending partner |
+ * | `processed` | Email sending partner has successfully received and prepared the message for sending to the user’s inbox provider |
+ * | `aborted` | Braze was unable to successfully dispatch the message due to the user not having an emailable address, or Liquid abort logic was called in the message body. All aborted events include a reason field within the metadata object indicating why the message was aborted |
+ * | `delivered` | Message was accepted by the user’s email inbox provider |
+ * | `bounced` | Message was rejected by the user’s email inbox provider. All bounced events include a reason field within the metadata object reflecting the bounce error code provided by the inbox provider |
+ *
+ * ### Example postback
+ *
+ * ``` json
+ * // Sent Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "sent",
+ * "metadata": {
+ * "received_at": "2020-08-31T18:58:41.000+00:00",
+ * "enqueued_at": "2020-08-31T18:58:41.000+00:00",
+ * "executed_at": "2020-08-31T18:58:41.000+00:00",
+ * "sent_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Processed Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "processed",
+ * "metadata": {
+ * "processed_at": "2020-08-31T18:58:42.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Aborted
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "aborted",
+ * "metadata": {
+ * "reason": "User not emailable",
+ * "aborted_at": "2020-08-31T19:04:51.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Delivered Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "delivered",
+ * "metadata": {
+ * "delivered_at": "2020-08-31T18:27:32.000+00:00",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ * // Bounced Event
+ * {
+ * "dispatch_id": "acf471119f7449d579e8089032003ded",
+ * "status": "bounced",
+ * "metadata": {
+ * "bounced_at": "2020-08-31T18:58:43.000+00:00",
+ * "reason": "550 5.1.1 The email account that you tried to reach does not exist",
+ * "campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
+ * "external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
+ * }
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $campaignId, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->campaign_id = $campaignId;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{campaign_id}'], [$this->campaign_id], '/transactional/v1/campaigns/{campaign_id}/send');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendBadRequestException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendUnauthorizedException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendForbiddenException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendNotFoundException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendTooManyRequestsException
+ * @throws \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostTransactionalV1CampaignsByCampaignIdSendInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersAliasNew.php b/lib/Endpoint/PostUsersAliasNew.php
new file mode 100644
index 0000000..006914e
--- /dev/null
+++ b/lib/Endpoint/PostUsersAliasNew.php
@@ -0,0 +1,127 @@
+ Use this endpoint to add new user aliases for existing identified users, or to create new unidentified users.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.alias.new` permission.
+ *
+ * Up to 50 user aliases may be specified per request.
+ *
+ **Adding a user alias for an existing user** requires an `external_id` to be included in the new user alias object. If the `external_id` is present in the object but there is no user with that `external_id`, the alias will not be added to any users. If an `external_id` is not present, a user will still be created but will need to be identified later. You can do this using the "Identifying Users" and the `users/identify` endpoint.
+ *
+ **Creating a new alias-only user** requires the `external_id` to be omitted from the new user alias object. Once the user is created, use the `/users/track` endpoint to associate the alias-only user with attributes, events, and purchases, and the `/users/identify` endpoint to identify the user with an `external_id`.
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete` and `/users/identify` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `user_aliases` | Required | Array of new user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/).
For more information on `alias_name` and `alias_label`, check out our [User Aliases](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases) documentation. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/alias/new';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersAliasNewBadRequestException
+ * @throws \Braze\Exception\PostUsersAliasNewUnauthorizedException
+ * @throws \Braze\Exception\PostUsersAliasNewForbiddenException
+ * @throws \Braze\Exception\PostUsersAliasNewNotFoundException
+ * @throws \Braze\Exception\PostUsersAliasNewTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersAliasNewInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasNewUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasNewForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasNewNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasNewTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasNewInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersAliasUpdate.php b/lib/Endpoint/PostUsersAliasUpdate.php
new file mode 100644
index 0000000..de3e429
--- /dev/null
+++ b/lib/Endpoint/PostUsersAliasUpdate.php
@@ -0,0 +1,138 @@
+ Use this endpoint to update existing user aliases.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.alias.update` permission.
+ *
+ * Up to 50 user aliases may be specified per request.
+ *
+ * This endpoint does not guarantee the sequence of `alias_updates` objects being updated.
+ *
+ * Updating a user alias requires `alias_label`, `old_alias_name`, and `new_alias_name` to be included in the update user alias object. If there is no user alias associated with the `alias_label` and `old_alias_name`, no alias will be updated. If the given `alias_label` and `old_alias_name` is found, then the `old_alias_name` will be updated to the `new_alias_name`.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete`, `/users/identify`, `/users/merge`, and `/users/alias/update` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `alias_updates` | Required | Array of update user alias objects | See [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/).
For more information on `old_alias_name`, `new_alias_name`, and `alias_label`, refer to [User aliases](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases). |
+ *
+ * ### Endpoint request body with update user alias object specification
+ *
+ * ``` json
+ * {
+ * "alias_label" : (required, string),
+ * "old_alias_name" : (required, string),
+ * "new_alias_name" : (required, string)
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/alias/update';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersAliasUpdateBadRequestException
+ * @throws \Braze\Exception\PostUsersAliasUpdateUnauthorizedException
+ * @throws \Braze\Exception\PostUsersAliasUpdateForbiddenException
+ * @throws \Braze\Exception\PostUsersAliasUpdateNotFoundException
+ * @throws \Braze\Exception\PostUsersAliasUpdateTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersAliasUpdateInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasUpdateUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasUpdateForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasUpdateNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasUpdateTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersAliasUpdateInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersDelete.php b/lib/Endpoint/PostUsersDelete.php
new file mode 100644
index 0000000..e9b1ce2
--- /dev/null
+++ b/lib/Endpoint/PostUsersDelete.php
@@ -0,0 +1,128 @@
+ Use this endpoint to delete any user profile by specifying a known user identifier.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.delete` permission.
+ *
+ * Up to 50 `external_ids`, `user_aliases`, or `braze_ids` can be included in a single request. Only one of `external_ids`, `user_aliases`, or `braze_ids` can be included in a single request.
+ *
+ * > **Important:** Deleting user profiles cannot be undone. It will permanently remove users which may cause discrepancies in your data. Learn more about what happens when you [delete a user profile via API](https://braze.com/docs/help/help_articles/api/delete_user/) in our Help documentation.
+ *
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/alias/new` and `/users/identify` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameter
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_ids` | Optional | Array of strings | External identifiers for the users to delete. |
+ * | `user_aliases` | Optional | Array of user alias object | [User aliases](https://www.braze.com/docs/api/objects_filters/user_alias_object/) for the users to delete. |
+ * | `braze_ids` | Optional | Array of strings | Braze user identifiers for the users to delete. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/delete';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersDeleteBadRequestException
+ * @throws \Braze\Exception\PostUsersDeleteUnauthorizedException
+ * @throws \Braze\Exception\PostUsersDeleteForbiddenException
+ * @throws \Braze\Exception\PostUsersDeleteNotFoundException
+ * @throws \Braze\Exception\PostUsersDeleteTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersDeleteInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersDeleteUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersDeleteForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersDeleteNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersDeleteTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersDeleteInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersExportGlobalControlGroup.php b/lib/Endpoint/PostUsersExportGlobalControlGroup.php
new file mode 100644
index 0000000..9c316ba
--- /dev/null
+++ b/lib/Endpoint/PostUsersExportGlobalControlGroup.php
@@ -0,0 +1,338 @@
+ Use this endpoint to export all users within a Global Control Group.
+ *
+ * User data is exported as multiple files of user JSON objects separated by new lines (i.e., one JSON object per line).
+ *
+ * > Warning: Individual custom attributes cannot be exported. However, all custom attributes can be exported by including custom_attributes in the fields_to_export array (e.g.,\[‘first_name’, ‘email’, ‘custom_attributes’\]).
+ *
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.export.global_control_group` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](http://localhost:4000/docs/api/api_limits/).
+ *
+ * ## Credential-based response details
+ *
+ * For information regarding credentials-based response details, visit this [section](https://www.braze.com/docs/api/endpoints/export/user_data/post_users_global_control_group/#credentials-based-response-details) in the Braze API docs.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `callback_endpoint` | Optional | String | Endpoint to post a download URL to when the export is available. |
+ * | `fields_to_export` | Required\* | Array of strings | Name of user data fields to export, you may also export custom attributes.
\*Beginning April 2021, new accounts must specify specific fields to export. |
+ * | `output_format` | Optional | String | When using your own S3 bucket, allows to specify file format as `zip` or `gzip`. Defaults to ZIP file format. |
+ *
+ * ## Fields to export
+ *
+ * The following is a list of valid `fields_to_export`. Using `fields_to_export` to minimize the data returned can improve response time of this API endpoint:
+ *
+ * | Field to export | Data type | Description |
+ * | --- | --- | --- |
+ * | `apps` | Array | Apps this user has logged sessions for, which includes the fields:
\- `name`: app name
\- `platform`: app platform, such as iOS, Android, or Web
\- `version`: app version number or name
\- `sessions`: total number of sessions for this app
\- `first_used`: date of first session
\- `last_used`: date of last session
All fields are strings. |
+ * | `attributed_campaign` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for a particular ad campaign. |
+ * | `attributed_source` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for the platform the ad was on. |
+ * | `attributed_adgroup` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign. |
+ * | `attributed_ad` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign and adgroup. |
+ * | `braze_id` | String | Device-specific unique user identifier set by Braze for this user. |
+ * | `country` | String | User's country using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. |
+ * | `created_at` | String | Date and time for when the user profile was created, in ISO 8601 format. |
+ * | `custom_attributes` | Object | Custom attribute key-value pairs for this user. |
+ * | `custom_events` | Array | Custom events attributed to this user in the last 90 days. |
+ * | `devices` | Array | Information about the user's device, which could include the following depending on platform:
\- `model`: Device's model name
\- `os`: Device's operating system
\- `carrier`: Device's service carrier, if available
\- `idfv`: (iOS) Braze's device identifier, the Apple Identifier for Vendor, if exists
\- `idfa`: (iOS) Identifier for Advertising, if exists
\- `device_id`: (Android) Braze's device identifier
\- `google_ad_id`: (Android) Google Play Advertising Identifier, if exists
\- `roku_ad_id`: (Roku) Roku Advertising Identifier
\- `ad_tracking_enabled`: If ad tracking is enabled on the device, can be true or false |
+ * | `dob` | String | User's date of birth in the format `YYYY-MM-DD`. |
+ * | `email` | String | User's email address. |
+ * | `external_id` | String | Unique user identifier for identified users. |
+ * | `first_name` | String | User's first name. |
+ * | `gender` | String | User's gender. Possible values are:
\- `M`: male
\- `F`: female
\- `O`: other
\- `N`: not applicable
\- `P`: prefer not to say
\- `nil`: unknown |
+ * | `home_city` | String | User's home city. |
+ * | `language` | String | User's language in ISO-639-1 standard. |
+ * | `last_coordinates` | Array of floats | User's most recent device location, formatted as `[longitude, latitude]`. |
+ * | `last_name` | String | User's last name. |
+ * | `phone` | String | User's telephone number in E.164 format. |
+ * | `purchase`s | Array | Purchases this user has made in the last 90 days. |
+ * | `random_bucket` | Integer | User's [random bucket number](https:/www.braze.com/docs/user_guide/data_and_analytics/braze_currents/event_glossary/customer_behavior_events#random-bucket-number-event), used to create uniformly distributed segments of random users. |
+ * | `time_zone` | String | User's time zone in the same format as the IANA Time Zone Database. |
+ * | `total_revenue` | Float | Total revenue attributed to this user. Total revenue is calculated based on purchases the user made during conversion windows for the campaigns and Canvases they received. |
+ * | `uninstalled_at` | Timestamp | Date and time the user uninstalls the app. Omitted if the app has not been uninstalled. |
+ * | `user_aliases` | Object | [User aliases object](https:/www.braze.com/docs/api/objects_filters/user_alias_object#user-alias-object-specification) containing the `alias_name` and `alias_label`, if exists. |
+ *
+ * ## Response
+ *
+ * ```
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "object_prefix": (required, string) the filename prefix that will be used for the JSON file produced by this export, e.g.,'bb8e2a91-c4aa-478b-b3f2-a4ee91731ad1-1464728599',
+ * "url" : (optional, string) the URL where the segment export data can be downloaded if you do not have your own S3 credentials
+ * }
+ *
+ * ```
+ *
+ * Once made available, the URL will only be valid for a few hours. As such, we highly recommend that you add your own S3 credentials to Braze.
+ *
+ * ### Sample user export file output
+ *
+ * User export object (we will include the least data possible - if a field is missing from the object it should be assumed to be null, false, or empty):
+ *
+ * ```
+ * {
+ * "external_id" : (string),
+ * "user_aliases" : [
+ * {
+ * "alias_name" : (string),
+ * "alias_label" : (string)
+ * }
+ * ],
+ * "braze_id": (string),
+ * "first_name" : (string),
+ * "last_name" : (string),
+ * "email" : (string),
+ * "dob" : (string) date for the user's date of birth,
+ * "home_city" : (string),
+ * "country" : (string),
+ * "phone" : (string),
+ * "language" : (string) ISO-639 two letter code,
+ * "time_zone" : (string),
+ * "last_coordinates" : (array of float) [lon, lat],
+ * "gender" : (string) "M" | "F",
+ * "total_revenue" : (float),
+ * "attributed_campaign" : (string),
+ * "attributed_source" : (string),
+ * "attributed_adgroup" : (string),
+ * "attributed_ad" : (string),
+ * "custom_attributes" : (object) custom attribute key-value pairs,
+ * "custom_events" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "purchases" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "devices" : [
+ * {
+ * "model" : (string),
+ * "os" : (string),
+ * "carrier" : (string),
+ * "idfv" : (string) only included for iOS devices,
+ * "idfa" : (string) only included for iOS devices when IDFA collection is enabled,
+ * "google_ad_id" : (string) only included for Android devices when Google Play Advertising Identifier collection is enabled,
+ * "roku_ad_id" : (string) only included for Roku devices,
+ * "windows_ad_id" : (string) only included for Windows devices,
+ * "ad_tracking_enabled" : (bool)
+ * },
+ * ...
+ * ],
+ * "apps" : [
+ * {
+ * "name" : (string),
+ * "platform" : (string),
+ * "version" : (string),
+ * "sessions" : (string),
+ * "first_used" : (string) date,
+ * "last_used" : (string) date
+ * },
+ * ...
+ * ],
+ * }
+ *
+ * ```
+ *
+ * ### Sample output
+ *
+ * ``` json
+ * {
+ * "created_at" : "2020-07-10 15:00:00.000 UTC",
+ * "external_id" : "A8i3mkd99",
+ * "user_aliases" : [
+ * {
+ * "alias_name" : "user_123",
+ * "alias_label" : "amplitude_id"
+ * }
+ * ],
+ * "braze_id": "5fbd99bac125ca40511f2cb1",
+ * "random_bucket" : 2365,
+ * "first_name" : "Jane",
+ * "last_name" : "Doe",
+ * "email" : "example@braze.com",
+ * "dob" : "1980-12-21",
+ * "home_city" : "Chicago",
+ * "country" : "US",
+ * "phone" : "+442071838750",
+ * "language" : "en",
+ * "time_zone" : "Eastern Time (US & Canada)",
+ * "last_coordinates" : [41.84157636433568, -87.83520818508256],
+ * "gender" : "F",
+ * "total_revenue" : 65,
+ * "attributed_campaign" : "braze_test_campaign_072219",
+ * "attributed_source" : "braze_test_source_072219",
+ * "attributed_adgroup" : "braze_test_adgroup_072219",
+ * "attributed_ad" : "braze_test_ad_072219",
+ * "custom_attributes":
+ * {
+ * "loyaltyId": "37c98b9d-9a7f-4b2f-a125-d873c5152856",
+ * "loyaltyPoints": "321",
+ * "loyaltyPointsNumber": 107
+ * },
+ * "custom_events": [
+ * {
+ * "name": "Loyalty Acknowledgement",
+ * "first": "2021-06-28T17:02:43.032Z",
+ * "last": "2021-06-28T17:02:43.032Z",
+ * "count": 1
+ * },
+ * ...
+ * ],
+ * "purchases": [
+ * {
+ * "name": "item_40834",
+ * "first": "2021-09-05T03:45:50.540Z",
+ * "last": "2022-06-03T17:30:41.201Z",
+ * "count": 10
+ * },
+ * ...
+ * ],
+ * "devices": [
+ * {
+ * "model": "Pixel XL",
+ * "os": "Android (Q)",
+ * "carrier": null,
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "ad_tracking_enabled": true
+ * },
+ * ...
+ * ],
+ * "apps": [
+ * {
+ * "name": "MovieCannon",
+ * "platform": "Android",
+ * "version": "3.29.0",
+ * "sessions": 1129,
+ * "first_used": "2020-02-02T19:56:19.142Z",
+ * "last_used": "2021-11-11T00:25:19.201Z"
+ * },
+ * ...
+ * ],
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/export/global_control_group';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupBadRequestException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupForbiddenException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupNotFoundException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExportGlobalControlGroupInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportGlobalControlGroupUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportGlobalControlGroupForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportGlobalControlGroupNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportGlobalControlGroupTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportGlobalControlGroupInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersExportId.php b/lib/Endpoint/PostUsersExportId.php
new file mode 100644
index 0000000..5ffc336
--- /dev/null
+++ b/lib/Endpoint/PostUsersExportId.php
@@ -0,0 +1,460 @@
+ Use this endpoint to export data from any user profile by specifying a user identifier.
+ *
+ * Up to 50 `external_ids` or `user_aliases` can be included in a single request. Should you want to specify `device_id` or `email_address` only one of either identifier can be included per request.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.export.ids` permission.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after August 16, 2021, we apply a rate limit of 2,500 requests per minute to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_ids` | Optional | Array of strings | External identifiers for users you wish export. |
+ * | `user_aliases` | Optional | Array of user alias object | [User aliases](https://www.braze.com/docs/api/objects_filters/user_alias_object/) for users to export. |
+ * | `device_id` | Optional | String | Device identifier, as returned by various SDK methods such as `getDeviceId`. |
+ * | `braze_id` | Optional | String | Braze identifier for a particular user. |
+ * | `email_address` | Optional | String | Email address of user. |
+ * | `phone` | Optional | String in [E.164](https://en.wikipedia.org/wiki/E.164) format | Phone number of user. |
+ * | `fields_to_export` | Optional | Array of strings | Name of user data fields to export. Defaults to all if not provided. |
+ *
+ * ## Fields to export
+ *
+ * The following is a list of valid `fields_to_export`. Using `fields_to_export` to minimize the data returned can improve response time of this API endpoint:
+ *
+ * | Field to export | Data type | Description |
+ * | --- | --- | --- |
+ * | `apps` | Array | Apps this user has logged sessions for, which includes the fields:
\- `name`: app name
\- `platform`: app platform, such as iOS, Android, or Web
\- `version`: app version number or name
\- `sessions`: total number of sessions for this app
\- `first_used`: date of first session
\- `last_used`: date of last session
All fields are strings. |
+ * | `attributed_campaign` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for a particular ad campaign. |
+ * | `attributed_source` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for the platform the ad was on. |
+ * | `attributed_adgroup` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign. |
+ * | `attributed_ad` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign and adgroup. |
+ * | `braze_id` | String | Device-specific unique user identifier set by Braze for this user. |
+ * | `country` | String | User's country using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. |
+ * | `created_at` | String | Date and time for when the user profile was created, in ISO 8601 format. |
+ * | `custom_attributes` | Object | Custom attribute key-value pairs for this user. |
+ * | `custom_events` | Array | Custom events attributed to this user in the last 90 days. |
+ * | `devices` | Array | Information about the user's device, which could include the following depending on platform:
\- `model`: Device's model name
\- `os`: Device's operating system
\- `carrier`: Device's service carrier, if available
\- `idfv`: (iOS) Braze's device identifier, the Apple Identifier for Vendor, if exists
\- `idfa`: (iOS) Identifier for Advertising, if exists
\- `device_id`: (Android) Braze's device identifier
\- `google_ad_id`: (Android) Google Play Advertising Identifier, if exists
\- `roku_ad_id`: (Roku) Roku Advertising Identifier
\- `ad_tracking_enabled`: If ad tracking is enabled on the device, can be true or false |
+ * | `dob` | String | User's date of birth in the format `YYYY-MM-DD`. |
+ * | `email` | String | User's email address. |
+ * | `external_id` | String | Unique user identifier for identified users. |
+ * | `first_name` | String | User's first name. |
+ * | `gender` | String | User's gender. Possible values are:
\- `M`: male
\- `F`: female
\- `O`: other
\- `N`: not applicable
\- `P`: prefer not to say
\- `nil`: unknown |
+ * | `home_city` | String | User's home city. |
+ * | `language` | String | User's language in ISO-639-1 standard. |
+ * | `last_coordinates` | Array of floats | User's most recent device location, formatted as `[longitude, latitude]`. |
+ * | `last_name` | String | User's last name. |
+ * | `phone` | String | User's telephone number in E.164 format. |
+ * | `purchase`s | Array | Purchases this user has made in the last 90 days. |
+ * | `random_bucket` | Integer | User's [random bucket number](https:/www.braze.com/docs/user_guide/data_and_analytics/braze_currents/event_glossary/customer_behavior_events#random-bucket-number-event), used to create uniformly distributed segments of random users. |
+ * | `time_zone` | String | User's time zone in the same format as the IANA Time Zone Database. |
+ * | `total_revenue` | Float | Total revenue attributed to this user. Total revenue is calculated based on purchases the user made during conversion windows for the campaigns and Canvases they received. |
+ * | `uninstalled_at` | Timestamp | Date and time the user uninstalls the app. Omitted if the app has not been uninstalled. |
+ * | `user_aliases` | Object | [User aliases object](https:/www.braze.com/docs/api/objects_filters/user_alias_object#user-alias-object-specification) containing the `alias_name` and `alias_label`, if exists. |
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "users" : (array of object) the data for each of the exported users, may be empty if no users are found,
+ * "invalid_user_ids" : (optional, array of string) each of the identifiers provided in the request that did not correspond to a known user
+ * }
+ *
+ * ```
+ *
+ * For an example of the data that is accessible via this endpoint see the following example.
+ *
+ * ### Sample user export file output
+ *
+ * User export object (we will include the least data possible - if a field is missing from the object it should be assumed to be null, false, or empty):
+ *
+ * ``` json
+ * {
+ * "external_id" : (string),
+ * "user_aliases" : [
+ * {
+ * "alias_name" : (string),
+ * "alias_label" : (string)
+ * }
+ * ],
+ * "braze_id": (string),
+ * "first_name" : (string),
+ * "last_name" : (string),
+ * "email" : (string),
+ * "dob" : (string) date for the user's date of birth,
+ * "home_city" : (string),
+ * "country" : (string),
+ * "phone" : (string),
+ * "language" : (string) ISO-639 two letter code,
+ * "time_zone" : (string),
+ * "last_coordinates" : (array of float) [lon, lat],
+ * "gender" : (string) "M" | "F",
+ * "total_revenue" : (float),
+ * "attributed_campaign" : (string),
+ * "attributed_source" : (string),
+ * "attributed_adgroup" : (string),
+ * "attributed_ad" : (string),
+ * "push_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "email_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "custom_attributes" : (object) custom attribute key-value pairs,
+ * "custom_events" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "purchases" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "devices" : [
+ * {
+ * "model" : (string),
+ * "os" : (string),
+ * "carrier" : (string),
+ * "idfv" : (string) only included for iOS devices,
+ * "idfa" : (string) only included for iOS devices when IDFA collection is enabled,
+ * "google_ad_id" : (string) only included for Android devices when Google Play Advertising Identifier collection is enabled,
+ * "roku_ad_id" : (string) only included for Roku devices,
+ * "windows_ad_id" : (string) only included for Windows devices,
+ * "ad_tracking_enabled" : (bool)
+ * },
+ * ...
+ * ],
+ * "push_tokens" : [
+ * {
+ * "app" : (string) app name,
+ * "platform" : (string),
+ * "token" : (string)
+ * },
+ * ...
+ * ],
+ * "apps" : [
+ * {
+ * "name" : (string),
+ * "platform" : (string),
+ * "version" : (string),
+ * "sessions" : (integer),
+ * "first_used" : (string) date,
+ * "last_used" : (string) date
+ * },
+ * ...
+ * ],
+ * "campaigns_received" : [
+ * {
+ * "name" : (string),
+ * "last_received" : (string) date,
+ * "engaged" : {
+ * "opened_email" : (bool),
+ * "opened_push" : (bool),
+ * "clicked_email" : (bool),
+ * "clicked_triggered_in_app_message" : (bool)
+ * },
+ * "converted" : (bool),
+ * "api_campaign_id" : (string),
+ * "variation_name" : (optional, string) exists only if it is a multivariate campaign,
+ * "variation_api_id" : (optional, string) exists only if it is a multivariate campaign,
+ * "in_control" : (optional, bool) exists only if it is a multivariate campaign
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_id": (string),
+ * "last_received_message": (string) date,
+ * "last_entered": (string) date,
+ * "variation_name": (string),
+ * "in_control": (bool),
+ * "last_exited": (string) date,
+ * "steps_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * }
+ * ]
+ * },
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : (string)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * #### Sample output
+ *
+ * ``` json
+ * {
+ * "created_at" : "2020-07-10 15:00:00.000 UTC",
+ * "external_id" : "A8i3mkd99",
+ * "user_aliases" : [
+ * {
+ * "alias_name" : "user_123",
+ * "alias_label" : "amplitude_id"
+ * }
+ * ],
+ * "braze_id": "5fbd99bac125ca40511f2cb1",
+ * "random_bucket" : 2365,
+ * "first_name" : "Jane",
+ * "last_name" : "Doe",
+ * "email" : "example@braze.com",
+ * "dob" : "1980-12-21",
+ * "home_city" : "Chicago",
+ * "country" : "US",
+ * "phone" : "+442071838750",
+ * "language" : "en",
+ * "time_zone" : "Eastern Time (US & Canada)",
+ * "last_coordinates" : [41.84157636433568, -87.83520818508256],
+ * "gender" : "F",
+ * "total_revenue" : 65,
+ * "attributed_campaign" : "braze_test_campaign_072219",
+ * "attributed_source" : "braze_test_source_072219",
+ * "attributed_adgroup" : "braze_test_adgroup_072219",
+ * "attributed_ad" : "braze_test_ad_072219",
+ * "push_subscribe" : "opted_in",
+ * "push_opted_in_at": "2020-01-26T22:45:53.953Z",
+ * "email_subscribe" : "subscribed",
+ * "custom_attributes":
+ * {
+ * "loyaltyId": "37c98b9d-9a7f-4b2f-a125-d873c5152856",
+ * "loyaltyPoints": "321",
+ * "loyaltyPointsNumber": 107
+ * },
+ * "custom_events": [
+ * {
+ * "name": "Loyalty Acknowledgement",
+ * "first": "2021-06-28T17:02:43.032Z",
+ * "last": "2021-06-28T17:02:43.032Z",
+ * "count": 1
+ * },
+ * ...
+ * ],
+ * "purchases": [
+ * {
+ * "name": "item_40834",
+ * "first": "2021-09-05T03:45:50.540Z",
+ * "last": "2022-06-03T17:30:41.201Z",
+ * "count": 10
+ * },
+ * ...
+ * ],
+ * "devices": [
+ * {
+ * "model": "Pixel XL",
+ * "os": "Android (Q)",
+ * "carrier": null,
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "ad_tracking_enabled": true
+ * },
+ * ...
+ * ],
+ * "push_tokens": [
+ * {
+ * "app": "MovieCanon",
+ * "platform": "Android",
+ * "token": "12345abcd",
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "notifications_enabled": true
+ * },
+ * ...
+ * ],
+ * "apps": [
+ * {
+ * "name": "MovieCannon",
+ * "platform": "Android",
+ * "version": "3.29.0",
+ * "sessions": 1129,
+ * "first_used": "2020-02-02T19:56:19.142Z",
+ * "last_used": "2021-11-11T00:25:19.201Z"
+ * },
+ * ...
+ * ],
+ * "campaigns_received": [
+ * {
+ * "name": "Email Unsubscribe",
+ * "api_campaign_id": "d72fdc84-ddda-44f1-a0d5-0e79f47ef942",
+ * "last_received": "2022-06-02T03:07:38.105Z",
+ * "engaged":
+ * {
+ * "opened_email": true
+ * },
+ * "converted": true,
+ * "multiple_converted":
+ * {
+ * "Primary Conversion Event - A": true
+ * },
+ * "in_control": false,
+ * "variation_name": "Variant 1",
+ * "variation_api_id": "1bddc73a-a134-4784-9134-5b5574a9e0b8"
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": "Non Global Holdout Group 4/21/21",
+ * "api_canvas_id": "46972a9d-dc81-473f-aa03-e3473b4ed781",
+ * "last_received_message": "2021-07-07T20:46:24.136Z",
+ * "last_entered": "2021-07-07T20:45:24.000+00:00",
+ * "variation_name": "Variant 1",
+ * "in_control": false,
+ * "last_entered_control_at": null,
+ * "last_exited": "2021-07-07T20:46:24.136Z",
+ * "steps_received": [
+ * {
+ * "name": "Step",
+ * "api_canvas_step_id": "43d1a349-c3c8-4be1-9fbe-ce708e4d1c39",
+ * "last_received": "2021-07-07T20:46:24.136Z"
+ * },
+ * ...
+ * ]
+ * }
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : "Loyalty Promo"
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > **Tip:** For help with CSV and API exports, visit [Export troubleshooting](https://www.braze.com/docs/user_guide/data_and_analytics/export_braze_data/export_troubleshooting/).
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/export/ids';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersExportIdBadRequestException
+ * @throws \Braze\Exception\PostUsersExportIdUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExportIdForbiddenException
+ * @throws \Braze\Exception\PostUsersExportIdNotFoundException
+ * @throws \Braze\Exception\PostUsersExportIdTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExportIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersExportSegment.php b/lib/Endpoint/PostUsersExportSegment.php
new file mode 100644
index 0000000..e4620dd
--- /dev/null
+++ b/lib/Endpoint/PostUsersExportSegment.php
@@ -0,0 +1,482 @@
+ Use this endpoint to export all the users within a segment.
+ *
+ * User data is exported as multiple files of user JSON objects separated by new lines (i.e., one JSON object per line).
+ *
+ * Data is exported to an automatically generated URL, or to an S3 bucket if this integration is already set up.
+ *
+ * This endpoint is currently not supported by Google Cloud Storage.
+ *
+ * Note that a company may run at most one export per segment using this endpoint at a given time. Wait for your export to complete before retrying.
+ *
+ * > Beginning December 2021, the following changed for this API:
+ *
+ * > 1\. The fields_to_export field in this API request is required. The option to default to all fields has been removed.
+ * 2\. The fields for custom_events, purchases, campaigns_received, and canvases_received only contain data from the last 90 days.
+ *
+ *
+ * Note: If you are using our [older navigation](https://www.braze.com/docs/navigation), `segment_id` can be found at **Developer Console > API Settings**.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.export.segment` permission.
+ *
+ * ## Rate limit
+ *
+ * We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Credential-based response details
+ *
+ * For information regarding credentials-based response details, visit this [section](https://www.braze.com/docs/api/endpoints/export/user_data/post_users_segment/#credentials-based-response-details) in the Braze API docs.
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `segment_id` | Required | String | Identifier for the segment to be exported. See [segment identifier](https://www.braze.com/docs/api/identifier_types/).
The segment_id for a given segment can be found in your **Settings > Setup and Testing > API Keys** within your Braze account or you can use the [Segment List Endpoint](https://www.braze.com/docs/api/endpoints/export/segments/get_segment/). |
+ * | `callback_endpoint` | Optional | String | Endpoint to post a download URL to when the export is available. |
+ * | `fields_to_export` | Required\* | Array of strings | Name of user data fields to export, you may also export custom attributes.
\*Beginning April 2021, new accounts must specify specific fields to export. |
+ * | `output_format` | Optional | String | When using your own S3 bucket, allows you to specify file format as `zip` or `gzip`. Defaults to ZIP file format. |
+ *
+ * ### Fields to export
+ *
+ * The following is a list of valid `fields_to_export`. Using `fields_to_export` to minimize the data returned can improve response time of this API endpoint:
+ *
+ * | Field to export | Data type | Description |
+ * | --- | --- | --- |
+ * | `apps` | Array | Apps this user has logged sessions for, which includes the fields:
\- `name`: app name
\- `platform`: app platform, such as iOS, Android, or Web
\- `version`: app version number or name
\- `sessions`: total number of sessions for this app
\- `first_used`: date of first session
\- `last_used`: date of last session
All fields are strings. |
+ * | `attributed_campaign` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for a particular ad campaign. |
+ * | `attributed_source` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for the platform the ad was on. |
+ * | `attributed_adgroup` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign. |
+ * | `attributed_ad` | String | Data from [attribution integrations](https:/www.braze.com/docs/partners/message_orchestration/attribution), if set up. Identifier for an optional sub-grouping below campaign and adgroup. |
+ * | `braze_id` | String | Device-specific unique user identifier set by Braze for this user. |
+ * | `country` | String | User's country using [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) standard. |
+ * | `created_at` | String | Date and time for when the user profile was created, in ISO 8601 format. |
+ * | `custom_attributes` | Object | Custom attribute key-value pairs for this user. |
+ * | `custom_events` | Array | Custom events attributed to this user in the last 90 days. |
+ * | `devices` | Array | Information about the user's device, which could include the following depending on platform:
\- `model`: Device's model name
\- `os`: Device's operating system
\- `carrier`: Device's service carrier, if available
\- `idfv`: (iOS) Braze's device identifier, the Apple Identifier for Vendor, if exists
\- `idfa`: (iOS) Identifier for Advertising, if exists
\- `device_id`: (Android) Braze's device identifier
\- `google_ad_id`: (Android) Google Play Advertising Identifier, if exists
\- `roku_ad_id`: (Roku) Roku Advertising Identifier
\- `ad_tracking_enabled`: If ad tracking is enabled on the device, can be true or false |
+ * | `dob` | String | User's date of birth in the format `YYYY-MM-DD`. |
+ * | `email` | String | User's email address. |
+ * | `external_id` | String | Unique user identifier for identified users. |
+ * | `first_name` | String | User's first name. |
+ * | `gender` | String | User's gender. Possible values are:
\- `M`: male
\- `F`: female
\- `O`: other
\- `N`: not applicable
\- `P`: prefer not to say
\- `nil`: unknown |
+ * | `home_city` | String | User's home city. |
+ * | `language` | String | User's language in ISO-639-1 standard. |
+ * | `last_coordinates` | Array of floats | User's most recent device location, formatted as `[longitude, latitude]`. |
+ * | `last_name` | String | User's last name. |
+ * | `phone` | String | User's telephone number in E.164 format. |
+ * | `purchase`s | Array | Purchases this user has made in the last 90 days. |
+ * | `random_bucket` | Integer | User's [random bucket number](https:/www.braze.com/docs/user_guide/data_and_analytics/braze_currents/event_glossary/customer_behavior_events#random-bucket-number-event), used to create uniformly distributed segments of random users. |
+ * | `time_zone` | String | User's time zone in the same format as the IANA Time Zone Database. |
+ * | `total_revenue` | Float | Total revenue attributed to this user. Total revenue is calculated based on purchases the user made during conversion windows for the campaigns and Canvases they received. |
+ * | `uninstalled_at` | Timestamp | Date and time the user uninstalls the app. Omitted if the app has not been uninstalled. |
+ * | `user_aliases` | Object | [User aliases object](https:/www.braze.com/docs/api/objects_filters/user_alias_object#user-alias-object-specification) containing the `alias_name` and `alias_label`, if exists. |
+ *
+ * ### Important reminders
+ *
+ * - The fields for `custom_events`, `purchases`, `campaigns_received`, and `canvases_received` will contain only contain data from the last 90 days.
+ * - Both `custom_events` and `purchases` contain fields for `first` and `count`. Both of these fields will reflect information from all time, and will not be limited to just data from the last 90 days. For example, if a particular user first did the event prior to 90 days ago, this will be accurately reflected in the `first` field, and the `count` field will take into account events that occurred prior to the last 90 days as well.
+ * - The number of concurrent segment exports a company can run at the endpoint level is capped at 100. Attempts that surpass this limit will result in an error.
+ *
+ *
+ * ### Response
+ *
+ * ``` json
+ * Content-Type: application/json
+ * Authorization: Bearer YOUR-REST-API-KEY
+ * {
+ * "message": (required, string) the status of the export, returns 'success' when completed without errors,
+ * "object_prefix": (required, string) the filename prefix that will be used for the JSON file produced by this export, e.g. 'bb8e2a91-c4aa-478b-b3f2-a4ee91731ad1-1464728599',
+ * "url" : (optional, string) the URL where the segment export data can be downloaded if you do not have your own S3 credentials
+ * }
+ *
+ * ```
+ *
+ * Once made available, the URL will only be valid for a few hours. As such, we highly recommend that you add your own S3 credentials to Braze.
+ *
+ * ### Sample user export file output
+ *
+ * User export object (we will include the least data possible - if a field is missing from the object it should be assumed to be null, false, or empty):
+ *
+ * ``` json
+ * {
+ * "external_id" : (string),
+ * "user_aliases" : [
+ * {
+ * "alias_name" : (string),
+ * "alias_label" : (string)
+ * }
+ * ],
+ * "braze_id": (string),
+ * "first_name" : (string),
+ * "last_name" : (string),
+ * "email" : (string),
+ * "dob" : (string) date for the user's date of birth,
+ * "home_city" : (string),
+ * "country" : (string),
+ * "phone" : (string),
+ * "language" : (string) ISO-639 two letter code,
+ * "time_zone" : (string),
+ * "last_coordinates" : (array of float) [lon, lat],
+ * "gender" : (string) "M" | "F",
+ * "total_revenue" : (float),
+ * "attributed_campaign" : (string),
+ * "attributed_source" : (string),
+ * "attributed_adgroup" : (string),
+ * "attributed_ad" : (string),
+ * "push_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "email_subscribe" : (string) "opted_in" | "subscribed" | "unsubscribed",
+ * "custom_attributes" : (object) custom attribute key value pairs,
+ * "custom_events" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "purchases" : [
+ * {
+ * "name" : (string),
+ * "first" : (string) date,
+ * "last" : (string) date,
+ * "count" : (int)
+ * },
+ * ...
+ * ],
+ * "devices" : [
+ * {
+ * "model" : (string),
+ * "os" : (string),
+ * "carrier" : (string),
+ * "idfv" : (string) only included for iOS devices,
+ * "idfa" : (string) only included for iOS devices when IDFA collection is enabled,
+ * "google_ad_id" : (string) only included for Android devices when Google Play Advertising Identifier collection is enabled,
+ * "roku_ad_id" : (string) only included for Roku devices,
+ * "windows_ad_id" : (string) only included for Windows devices,
+ * "ad_tracking_enabled" : (bool)
+ * },
+ * ...
+ * ],
+ * "push_tokens" : [
+ * {
+ * "app" : (string) app name,
+ * "platform" : (string),
+ * "token" : (string)
+ * },
+ * ...
+ * ],
+ * "apps" : [
+ * {
+ * "name" : (string),
+ * "platform" : (string),
+ * "version" : (string),
+ * "sessions" : (string),
+ * "first_used" : (string) date,
+ * "last_used" : (string) date
+ * },
+ * ...
+ * ],
+ * "campaigns_received" : [
+ * {
+ * "name" : (string),
+ * "last_received" : (string) date,
+ * "engaged" : {
+ * "opened_email" : (bool),
+ * "opened_push" : (bool),
+ * "clicked_email" : (bool),
+ * "clicked_in_app_message" : (bool)
+ * },
+ * "converted" : (bool),
+ * "api_campaign_id" : (string),
+ * "variation_name" : (optional, string) exists only if it is a multivariate campaign,
+ * "variation_api_id" : (optional, string) exists only if it is a multivariate campaign,
+ * "in_control" : (optional, bool) exists only if it is a multivariate campaign
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_id": (string),
+ * "last_received_message": (string) date,
+ * "last_entered": (string) date,
+ * "variation_name": (string),
+ * "in_control": (bool),
+ * "last_exited": (string) date,
+ * "steps_received": [
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * },
+ * {
+ * "name": (string),
+ * "api_canvas_step_id": (string),
+ * "last_received": (string) date
+ * }
+ * ]
+ * },
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : (string)
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * Sample output
+ *
+ * ``` json
+ * {
+ * "created_at" : "2020-07-10 15:00:00.000 UTC",
+ * "external_id" : "A8i3mkd99",
+ * "user_aliases" : [
+ * {
+ * "alias_name" : "user_123",
+ * "alias_label" : "amplitude_id"
+ * }
+ * ],
+ * "braze_id": "5fbd99bac125ca40511f2cb1",
+ * "random_bucket" : 2365,
+ * "first_name" : "Jane",
+ * "last_name" : "Doe",
+ * "email" : "example@braze.com",
+ * "dob" : "1980-12-21",
+ * "home_city" : "Chicago",
+ * "country" : "US",
+ * "phone" : "+442071838750",
+ * "language" : "en",
+ * "time_zone" : "Eastern Time (US & Canada)",
+ * "last_coordinates" : [41.84157636433568, -87.83520818508256],
+ * "gender" : "F",
+ * "total_revenue" : 65,
+ * "attributed_campaign" : "braze_test_campaign_072219",
+ * "attributed_source" : "braze_test_source_072219",
+ * "attributed_adgroup" : "braze_test_adgroup_072219",
+ * "attributed_ad" : "braze_test_ad_072219",
+ * "push_subscribe" : "opted_in",
+ * "push_opted_in_at": "2020-01-26T22:45:53.953Z",
+ * "email_subscribe" : "subscribed",
+ * "custom_attributes":
+ * {
+ * "loyaltyId": "37c98b9d-9a7f-4b2f-a125-d873c5152856",
+ * "loyaltyPoints": "321",
+ * "loyaltyPointsNumber": 107
+ * },
+ * "custom_events": [
+ * {
+ * "name": "Loyalty Acknowledgement",
+ * "first": "2021-06-28T17:02:43.032Z",
+ * "last": "2021-06-28T17:02:43.032Z",
+ * "count": 1
+ * },
+ * ...
+ * ],
+ * "purchases": [
+ * {
+ * "name": "item_40834",
+ * "first": "2021-09-05T03:45:50.540Z",
+ * "last": "2022-06-03T17:30:41.201Z",
+ * "count": 10
+ * },
+ * ...
+ * ],
+ * "devices": [
+ * {
+ * "model": "Pixel XL",
+ * "os": "Android (Q)",
+ * "carrier": null,
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "ad_tracking_enabled": true
+ * },
+ * ...
+ * ],
+ * "push_tokens": [
+ * {
+ * "app": "MovieCanon",
+ * "platform": "Android",
+ * "token": "12345abcd",
+ * "device_id": "312ef2c1-83db-4789-967-554545a1bf7a",
+ * "notifications_enabled": true
+ * },
+ * ...
+ * ],
+ * "apps": [
+ * {
+ * "name": "MovieCannon",
+ * "platform": "Android",
+ * "version": "3.29.0",
+ * "sessions": 1129,
+ * "first_used": "2020-02-02T19:56:19.142Z",
+ * "last_used": "2021-11-11T00:25:19.201Z"
+ * },
+ * ...
+ * ],
+ * "campaigns_received": [
+ * {
+ * "name": "Email Unsubscribe",
+ * "api_campaign_id": "d72fdc84-ddda-44f1-a0d5-0e79f47ef942",
+ * "last_received": "2022-06-02T03:07:38.105Z",
+ * "engaged":
+ * {
+ * "opened_email": true
+ * },
+ * "converted": true,
+ * "multiple_converted":
+ * {
+ * "Primary Conversion Event - A": true
+ * },
+ * "in_control": false,
+ * "variation_name": "Variant 1",
+ * "variation_api_id": "1bddc73a-a134-4784-9134-5b5574a9e0b8"
+ * },
+ * ...
+ * ],
+ * "canvases_received": [
+ * {
+ * "name": "Non Global Holdout Group 4/21/21",
+ * "api_canvas_id": "46972a9d-dc81-473f-aa03-e3473b4ed781",
+ * "last_received_message": "2021-07-07T20:46:24.136Z",
+ * "last_entered": "2021-07-07T20:45:24.000+00:00",
+ * "variation_name": "Variant 1",
+ * "in_control": false,
+ * "last_entered_control_at": null,
+ * "last_exited": "2021-07-07T20:46:24.136Z",
+ * "steps_received": [
+ * {
+ * "name": "Step",
+ * "api_canvas_step_id": "43d1a349-c3c8-4be1-9fbe-ce708e4d1c39",
+ * "last_received": "2021-07-07T20:46:24.136Z"
+ * },
+ * ...
+ * ]
+ * }
+ * ...
+ * ],
+ * "cards_clicked" : [
+ * {
+ * "name" : "Loyalty Promo"
+ * },
+ * ...
+ * ]
+ * }
+ *
+ * ```
+ *
+ * > Tip: For help with CSV and API exports, visit Export troubleshooting.
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/export/segment';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersExportSegmentBadRequestException
+ * @throws \Braze\Exception\PostUsersExportSegmentUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExportSegmentForbiddenException
+ * @throws \Braze\Exception\PostUsersExportSegmentNotFoundException
+ * @throws \Braze\Exception\PostUsersExportSegmentTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExportSegmentInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportSegmentUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportSegmentForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportSegmentNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportSegmentTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExportSegmentInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersExternalIdsRemove.php b/lib/Endpoint/PostUsersExternalIdsRemove.php
new file mode 100644
index 0000000..7d2329e
--- /dev/null
+++ b/lib/Endpoint/PostUsersExternalIdsRemove.php
@@ -0,0 +1,149 @@
+ Use this endpoint to remove your users' old deprecated external IDs.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.external_ids.remove` permission.
+ *
+ * You can send up to 50 external IDs per request. You will need to create a new [API key](https://www.braze.com/docs/api/api_key/) with permissions for this endpoint.
+ *
+ * > **Warning:** This endpoint completely removes the deprecated ID and cannot be undone. Using this endpoint to remove deprecated \`external_ids\` that are still associated with users in your system can permanently prevent you from finding those users' data.
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply a rate limit of 1,000 requests per minute to this endpoint, as documented in [API rate limits](http://braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_ids` | Required | Array of strings | External identifiers for the users to remove |
+ *
+ * > Important: Only deprecated IDs can be removed; attempting to remove a primary external ID will result in an error.
+ *
+ *
+ * ## Response
+ *
+ * The response will confirm all successful removals, as well as unsuccessful removals with the associated errors. Error messages in the `removal_errors` field will reference the index in the array of the original request.
+ *
+ * ``` json
+ * {
+ * "message" : (string) status message,
+ * "removed_ids" : (array of successful Remove Operations),
+ * "removal_errors": (array of any )
+ * }
+ *
+ * ```
+ *
+ * The `message` field will return `success` for any valid request. More specific errors are captured in the `removal_errors` array. The `message` field returns an error in the case of:
+ *
+ * - Invalid API key
+ * - Empty `external_ids` array
+ * - `external_ids` array with more than 50 items
+ * - Rate limit hit (>1,000 requests/minute)
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/external_ids/remove';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveBadRequestException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveForbiddenException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveNotFoundException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExternalIdsRemoveInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRemoveUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRemoveForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRemoveNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRemoveTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRemoveInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersExternalIdsRename.php b/lib/Endpoint/PostUsersExternalIdsRename.php
new file mode 100644
index 0000000..1472a5c
--- /dev/null
+++ b/lib/Endpoint/PostUsersExternalIdsRename.php
@@ -0,0 +1,173 @@
+ Use this endpoint to rename your users’ external IDs.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.external_ids.rename` permission.
+ *
+ * You can send up to 50 rename objects per request. You will need to create a new [API key](https://www.braze.com/docs/api/api_key/) with permissions for this endpoint.
+ *
+ * This endpoint sets a new (primary) `external_id` for the user and deprecates their existing `external_id`. This means that the user can be identified by either `external_id` until the deprecated one is removed. Having multiple external IDs allows for a migration period so that older versions of your apps that use the previous external ID naming schema don't break.
+ *
+ * After your old naming schema is no longer in use, we highly recommend removing deprecated external IDs using the [`/users/external_ids/remove` endpoint](https://www.braze.com/docs/api/endpoints/user_data/external_id_migration/post_external_ids_remove).
+ *
+ * > **Warning:** Make sure to remove deprecated external IDs with the
+ *
+ *
+ * ## Rate limit
+ *
+ * We apply a rate limit of 1,000 requests per minute to this endpoint, as documented in [API rate limits](http://braze.com/docs/api/api_limits/).
+ *
+ * ### Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `external_id_renames` | Required | Array of external ID rename objects | View request example and the following limitations for structure of external ID rename object |
+ *
+ * - The `current_external_id` must be the user’s primary ID, and cannot be a deprecated ID
+ * - The `new_external_id` must not already be in use as either a primary ID or a deprecated ID
+ * - The `current_external_id` and `new_external_id` cannot be the same
+ *
+ *
+ * ## Response
+ *
+ * The response will confirm all successful renames, as well as unsuccessful renames with any associated errors. Error messages in the `rename_errors` field will reference the index of the object in the array of the original request.
+ *
+ * ``` json
+ * {
+ * "message" : (string) status message,
+ * "external_ids" : (array of successful Rename Operations),
+ * "rename_errors": (array of any )
+ * }
+ *
+ * ```
+ *
+ * The `message` field will return `success` for any valid request. More specific errors are captured in the `rename_errors` array. The `message` field returns an error in the case of:
+ *
+ * - Invalid API key
+ * - Empty `external_id_renames` array
+ * - `external_id_renames` array with more than 50 objects
+ * - Rate limit hit (>1,000 requests/minute)
+ *
+ *
+ * ## Frequently Asked Questions
+ *
+ **Does this impact MAU?**
+ * No, since the number of users will stay the same, they’ll just have a new `external_id`.
+ *
+ **Does user behavior change historically?**
+ * No, since the user is still the same user, and all their historical behavior is still connected to them.
+ *
+ **Can it be run on dev/staging app groups?**
+ * Yes. In fact, we highly recommend running a test migration on a staging or development app group, and ensuring everything has gone smoothly before executing on production data.
+ *
+ **Does this consume data points?**
+ * This feature does not cost data points.
+ *
+ **What is the recommended deprecation period?**
+ * We have no hard limit on how long you can keep deprecated external IDs around, but we highly recommend removing them once there is no longer a need to reference users by the deprecated ID.
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/external_ids/rename';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameBadRequestException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameUnauthorizedException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameForbiddenException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameNotFoundException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersExternalIdsRenameInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRenameUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRenameForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRenameNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRenameTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersExternalIdsRenameInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersIdentify.php b/lib/Endpoint/PostUsersIdentify.php
new file mode 100644
index 0000000..52ab75b
--- /dev/null
+++ b/lib/Endpoint/PostUsersIdentify.php
@@ -0,0 +1,194 @@
+ Use this endpoint to identify an unidentified (alias-only) user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.identify` permission.
+ *
+ * Calling `/users/identify` combines the alias-only profile with the identified profile and removes the alias-only profile.
+ *
+ * Identifying a user requires an `external_id` to be included in the `aliases_to_identify` object. If there is no user with that `external_id`, the `external_id` will simply be added to the aliased user's record, and the user will be considered identified. You can add up to 50 user aliases per request.
+ *
+ * Subsequently, you can associate multiple additional user aliases with a single `external_id`.
+ *
+ * - When these subsequent associations are made with the `merge_behavior` field set to `none`, only the push tokens and message history associated with the user alias are retained; any attributes, events, or purchases will be "orphaned" and not available on the identified user. One workaround is to export the aliased user's data before identification using the [`/users/export/ids` endpoint](https://www.braze.com/docs/api/endpoints/export/user_data/post_users_identifier/), then re-associate the attributes, events, and purchases with the identified user.
+ * - When associations are made with the `merge_behavior` field set to `merge`, this endpoint will merge [specific fields](#merge) found on the anonymous user to the identified user.
+ *
+ *
+ * > Note: To prevent unexpected loss of data when identifying users, we highly recommend that you first refer to [data collection best practices](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/best_practices/#capturing-user-data-when-alias-only-user-info-is-already-present) to learn about capturing user data when alias-only user info is already present.
+ *
+ *
+ * ### Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete` and `/users/alias/new` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ### Parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `aliases_to_identify` | Required | Array of aliases to identify object | See [alias to identify object](https://www.braze.com/docs/api/objects_filters/aliases_to_identify/) and [user alias object](https://www.braze.com/docs/api/objects_filters/user_alias_object/). |
+ * | `merge_behavior` | Optional | String | One of `none` or `merge` is expected. |
+ *
+ * #### Merge_behavior field
+ *
+ * Setting the `merge_behavior` field to `merge` sets the endpoint to merge any of the following fields found **exclusively** on the anonymous user to the identified user.
+ *
+ * - First name
+ * - Last name
+ * - Email
+ * - Gender
+ * - Date of birth
+ * - Phone number
+ * - Time zone
+ * - Home city
+ * - Country
+ * - Language
+ * - Session count (the sum of sessions from both profiles)
+ * - Date of first session (Braze will pick the earlier date of the two dates)
+ * - Date of last session (Braze will pick the later date of the two dates)
+ * - Custom attributes
+ * - Custom event and purchase event data (excluding event properties)
+ * - Custom event and purchase event properties for "X times in Y days" segmentation (where X<=50 and Y<=30)
+ * - Segmentable custom events summary
+ * - Event count (the sum from both profiles)
+ * - Event first occurred (Braze will pick the earlier date of the two dates)
+ * - Event last occurred (Braze will pick the later date of the two dates)
+ * - In-app purchase total in cents (the sum from both profiles)
+ * - Total number of purchases (the sum from both profiles)
+ * - Date of first purchase (Braze will pick the earlier date of the two dates)
+ * - Date of last purchase (Braze will pick the later date of the two dates)
+ * - App summaries
+ * - Last_X_at fields (Braze will update the fields if the orphaned profile fields are more recent)
+ * - Campaign summaries (Braze will pick the most recent date fields)
+ * - Workflow summaries (Braze will pick the most recent date fields)
+ * - Message and message engagement history
+ *
+ *
+ * Any of the following fields found on the anonymous user to the identified user:
+ *
+ * - Custom event and purchase event count and first date and last date timestamps
+ * - These merged fields will update "for X events in Y days" filters. For purchase events, these filters include "number of purchases in Y days" and "money spent in last Y days".
+ *
+ * Session data will only be merged if the app exists on both user profiles. For example, if our target user doesn't have an app summary for "ABCApp" but our original user does, the target user will have the "ABCApp" app summary on their profile after the merge.
+ *
+ * Setting the field to `none` will not merge any user data to the identified user profile.
+ *
+ * ### Aliases to Identify object specification
+ *
+ * ``` json
+ * {
+ * "external_id" : (required, string) see External User ID below,
+ * // external_ids for users that do not exist will return a non-fatal error.
+ * // See Server Responses for details.
+ * "user_alias" : {
+ * "alias_name" : (required, string),
+ * "alias_label" : (required, string)
+ * }
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/identify';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersIdentifyBadRequestException
+ * @throws \Braze\Exception\PostUsersIdentifyUnauthorizedException
+ * @throws \Braze\Exception\PostUsersIdentifyForbiddenException
+ * @throws \Braze\Exception\PostUsersIdentifyNotFoundException
+ * @throws \Braze\Exception\PostUsersIdentifyTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersIdentifyInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersIdentifyUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersIdentifyForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersIdentifyNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersIdentifyTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersIdentifyInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersMerge.php b/lib/Endpoint/PostUsersMerge.php
new file mode 100644
index 0000000..394fb5a
--- /dev/null
+++ b/lib/Endpoint/PostUsersMerge.php
@@ -0,0 +1,239 @@
+ Use this endpoint to merge one user into another user.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.merge` permission.
+ *
+ * Up to 50 merges may be specified per request. This endpoint is asynchronous.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete`, `/users/alias/new`, `/users/identify`, and `/users/alias/update` endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `merge_updates` | Required | Array | An object array. Each object should contain an `identifier_to_merge` object and an `identifier_to_keep` object, which should each reference a user either by `external_id` or `user_alias`. Both users being merged must be identified using the same method. |
+ *
+ * ### Merge_updates behavior
+ *
+ * This endpoint will merge any of the following fields found exclusively on the original user to the target user.
+ *
+ * - First name
+ * - Last name
+ * - Email
+ * - Gender
+ * - Date of birth
+ * - Phone number
+ * - Time zone
+ * - Home city
+ * - Country
+ * - Language
+ * - Session count (the sum of sessions from both profiles)
+ * - Date of first session (Braze will pick the earlier date of the two dates)
+ * - Date of last session (Braze will pick the later date of the two dates)
+ * - Custom attributes
+ * - Custom event and purchase event data (excluding event properties)
+ * - Custom event and purchase event properties for "X times in Y days" segmentation (where X<=50 and Y<=30)
+ * - Segmentable custom events summary
+ * - Event count (the sum from both profiles)
+ * - Event first occurred (Braze will pick the earlier date of the two dates)
+ * - Event last occurred (Braze will pick the later date of the two dates)
+ * - In-app purchase total in cents (the sum from both profiles)
+ * - Total number of purchases (the sum from both profiles)
+ * - Date of first purchase (Braze will pick the earlier date of the two dates)
+ * - Date of last purchase (Braze will pick the later date of the two dates)
+ * - App summaries
+ * - Last_X_at fields (Braze will update the fields if the orphaned profile fields are more recent)
+ * - Campaign summaries (Braze will pick the most recent date fields)
+ * - Workflow summaries (Braze will pick the most recent date fields)
+ *
+ *
+ * Any of the following fields found on one user to the other user:
+ *
+ * - Custom event and purchase event count and first date and last date timestamps
+ * - These merged fields will update "for X events in Y days" filters. For purchase events, these filters include "number of purchases in Y days" and "money spent in last Y days".
+ *
+ * Session data will only be merged if the app exists on both user profiles. For example, if our target user doesn't have an app summary for "ABCApp" but our original user does, the target user will have the "ABCApp" app summary on their profile after the merge. Note that message and message engagement history aren't retained after both user profiles are merged.
+ *
+ * The endpoint does not guarantee the sequence of `merge_updates` objects being updated.
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-03.braze.com/users/merge' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "merge_updates": [
+ * {
+ * "identifier_to_merge": {
+ * "external_id": "old-user1"
+ * },
+ * "identifier_to_keep": {
+ * "external_id": "current-user1"
+ * }
+ * },
+ * {
+ * "identifier_to_merge": {
+ * "user_alias": {
+ * "alias_name": "old-user2@example.com",
+ * "alias_label": "email"
+ * }
+ * },
+ * "identifier_to_keep": {
+ * "user_alias": {
+ * "alias_name": "current-user2@example.com",
+ * "alias_label": "email"
+ * }
+ * }
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are two status code responses for this endpoint: `202` and `400`.
+ *
+ * ### Example success response
+ *
+ * The status code `202` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to Troubleshooting (below) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "message": "'merge_updates' must be an array of objects"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible error messages that may occur.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `'merge_updates' must be an array of objects` | Ensure that `merge_updates` is an array of objects. |
+ * | `a single request may not contain more than 50 merge updates` | You can only specify up to 50 merge updates in a single request. |
+ * | `identifiers must be objects with an 'external_id' property that is a string, or 'user_alias' property that is an object` | Check the identifiers in your request. |
+ * | `identifiers must be objects of the same type` | Ensure that the identifier object types match. |
+ * | `'merge_updates' must only have 'identifier_to_merge' and 'identifier_to_keep'` | Ensure that `merge_updates` only contains the two objects `identifier_to_merge` and `identifier_to_keep`. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/merge';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersMergeBadRequestException
+ * @throws \Braze\Exception\PostUsersMergeUnauthorizedException
+ * @throws \Braze\Exception\PostUsersMergeForbiddenException
+ * @throws \Braze\Exception\PostUsersMergeNotFoundException
+ * @throws \Braze\Exception\PostUsersMergeTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersMergeInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersMergeUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersMergeForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersMergeNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersMergeTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersMergeInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostUsersTrack.php b/lib/Endpoint/PostUsersTrack.php
new file mode 100644
index 0000000..03e109a
--- /dev/null
+++ b/lib/Endpoint/PostUsersTrack.php
@@ -0,0 +1,221 @@
+ Use this endpoint to record custom events, purchases, and update user profile attributes.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `users.track` permission.
+ *
+ **Note:** Braze processes the data passed via API at face value and customers should only pass deltas (changing data) to minimize unnecessary data point consumption. To read more, refer to [Data points](https://www.braze.com/docs/user_guide/onboarding_with_braze/data_points#data-points).
+ *
+ * Customers using the API for server-to-server calls may need to allowlist `rest.iad-01.braze.com` if they’re behind a firewall.
+ *
+ * ### Rate limit
+ *
+ * We apply a base speed limit of 50,000 requests per minute to this endpoint for all customers. Each request to the `/users/track` endpoint can contain up to 75 events, 75 attribute updates, and 75 purchases. Each component (event, attribute, and purchase arrays), can update up to 75 users each for a max of 225 individual data points. Each update can also belong to the same user for a max of 225 updates to a single user in a request.
+ *
+ * See our page on [API rate limits](https://www.braze.com/docs/api/api_limits/) for details, and reach out to your customer success manager if you need your limit increased.
+ *
+ * ### Request parameters
+ *
+ * For each of the request components listed in the following table, one of `external_id`, `user_alias`, or `braze_id` is required.
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `attributes` | Optional | Array of attributes objects | See [user attributes object](https://www.braze.com/docs/api/objects_filters/user_attributes_object/) |
+ * | `events` | Optional | Array of event objects | See [events object](https://www.braze.com/docs/api/objects_filters/event_object/) |
+ * | `purchases` | Optional | Array of purchase objects | See [purchases object](https://www.braze.com/docs/api/objects_filters/purchase_object/) |
+ *
+ * ## User track responses
+ *
+ * Upon using any of the aforementioned API requests you should receive one of the following three general responses:
+ *
+ * #### Successful message
+ *
+ * Successful messages will be met with the following response:
+ *
+ * ``` json
+ * {
+ * "message" : "success",
+ * "attributes_processed" : (optional, integer), if attributes are included in the request, this will return an integer of the number of external_ids with attributes that were queued to be processed,
+ * "events_processed" : (optional, integer), if events are included in the request, this will return an integer of the number of events that were queued to be processed,
+ * "purchases_processed" : (optional, integer), if purchases are included in the request, this will return an integer of the number of purchases that were queued to be processed,
+ * }
+ *
+ * ```
+ *
+ * #### Successful message with non-fatal errors
+ *
+ * If your message is successful but has non-fatal errors such as one invalid event object out of a long list of events, then you will receive the following response:
+ *
+ * ``` json
+ * {
+ * "message" : "success",
+ * "errors" : [
+ * {
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * #### Message with fatal errors
+ *
+ * In the case of a success, any data that was not affected by an error in the `errors` array will still be processed. If your message has a fatal error you will receive the following response:
+ *
+ * ``` json
+ * {
+ * "message" : ,
+ * "errors" : [
+ * {
+ * }
+ * ]
+ * }
+ *
+ * ```
+ *
+ * ### Fatal error response codes
+ *
+ * For status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/api/errors/#fatal-errors).
+ *
+ * If you receive the error “provided external_id is blacklisted and disallowed”, your request may have included a “dummy user”. For more information, refer to [Spam blocking](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_archival/#spam-blocking).
+ *
+ * ### Creating an alias-only user profile
+ *
+ * Keep the following nuances in mind when using the `/users/track` endpoint:
+ *
+ * You can use the `/users/track` endpoint to create a new alias-only user by setting the `_update_existing_only` key with a value of `false` in the body of the request. If this value is omitted, the alias-only user profile will not be created. Using an alias-only user guarantees that one profile with that alias will exist. This is especially helpful when building a new integration as it prevents the creation of duplicate user profiles.
+ *
+ * ### Importing legacy user data
+ *
+ * You may submit data through the Braze API for a user who has not yet used your mobile app in order to generate a user profile. If the user subsequently uses the application all information following their identification via the SDK will be merged with the existing user profile you created via the API call. Any user behavior that is recorded anonymously by the SDK prior to identification will be lost upon merging with the existing API-generated user profile.
+ *
+ * The segmentation tool will include these users regardless of whether they have engaged with the app. If you want to exclude users uploaded via the User API who have not yet engaged with the app, simply add the filter: `Session Count > 0`.
+ *
+ * ### Making bulk updates
+ *
+ * If you have a use case where you need to make batch updates to the `users/track` endpoint, we recommend adding the bulk update header so that Braze can properly identify, observe, and route your request.
+ *
+ * Refer to the following sample request with the `X-Braze-Bulk` header:
+ *
+ * ``` json
+ * curl --location --request POST 'https://rest.iad-01.braze.com/users/track' \
+ * --header 'Content-Type: application/json' \
+ * --header 'X-Braze-Bulk: true' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE' \
+ * --data-raw '{ "attributes": [ ], "events": [ ], "purchases": [ ] }'
+ *
+ * ```
+ *
+ * Warning: When the `X-Braze-Bulk` header is present with any value, Braze will consider the request a bulk request. Set the value to `true`. Currently, setting the value to `false` does not disable the header—it will still be treated as if it were true.
+ *
+ * #### Use cases
+ *
+ * Consider the following use cases where you may use the bulk update header:
+ *
+ * - A daily job where multiple users’ custom attributes are updated via the `/users/track` endpoint.
+ * - An ad-hoc user data backfill script which updates user information via the `/users/track` endpoint.
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/users/track';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostUsersTrackBadRequestException
+ * @throws \Braze\Exception\PostUsersTrackUnauthorizedException
+ * @throws \Braze\Exception\PostUsersTrackForbiddenException
+ * @throws \Braze\Exception\PostUsersTrackNotFoundException
+ * @throws \Braze\Exception\PostUsersTrackTooManyRequestsException
+ * @throws \Braze\Exception\PostUsersTrackInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersTrackUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersTrackForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersTrackNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersTrackTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostUsersTrackInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PostV2SubscriptionStatusSet.php b/lib/Endpoint/PostV2SubscriptionStatusSet.php
new file mode 100644
index 0000000..fc15dec
--- /dev/null
+++ b/lib/Endpoint/PostV2SubscriptionStatusSet.php
@@ -0,0 +1,137 @@
+ Use this endpoint to batch update the subscription state of up to 50 users on the Braze dashboard.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `subscription.status.set` permission.
+ *
+ * You can access a subscription group’s `subscription_group_id` by navigating to the **Subscriptions Group** page.
+ *
+ * ## Rate limit
+ *
+ * For customers who onboarded with Braze on or after January 6, 2022, we apply a rate limit of 5,000 requests per minute shared across the `/subscription/status/set` and `/v2/subscription/status/set` endpoint as documented in [API rate limits](http://localhost:4000/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `subscription_group_id` | Required | String | The `id` of your subscription group. |
+ * | `subscription_state` | Required | String | Available values are `unsubscribed` (not in subscription group) or `subscribed` (in subscription group). |
+ * | `external_ids` | Required\* | Array of strings | The `external_id` of the user or users, may include up to 50 `id`s. |
+ * | `phones` | Required\* | String in [E.164](https://en.wikipedia.org/wiki/E.164) format | The phone numbers of the user, can be passed as an array of strings. Must include at least one phone number (with a max of 50). |
+ *
+ * ### Example successful response
+ *
+ * Response: (status 201)
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(\stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'POST';
+ }
+
+ public function getUri(): string
+ {
+ return '/v2/subscription/status/set';
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetBadRequestException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetUnauthorizedException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetForbiddenException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetNotFoundException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetTooManyRequestsException
+ * @throws \Braze\Exception\PostV2SubscriptionStatusSetInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostV2SubscriptionStatusSetUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostV2SubscriptionStatusSetForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostV2SubscriptionStatusSetNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostV2SubscriptionStatusSetTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PostV2SubscriptionStatusSetInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PutCatalogsByCatalogNameItem.php b/lib/Endpoint/PutCatalogsByCatalogNameItem.php
new file mode 100644
index 0000000..43a3766
--- /dev/null
+++ b/lib/Endpoint/PutCatalogsByCatalogNameItem.php
@@ -0,0 +1,194 @@
+ Use this endpoint to send Canvas messages via API-triggered delivery.
+ *
+ * To use this endpoint, you'll need to generate an API key with the `catalogs.replace_item` permission.
+ *
+ * API-triggered Delivery allows you to store message content in the Braze dashboard while dictating when a message is sent, and to whom via your API.
+ *
+ * Note that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier), created when you build a Canvas.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example request
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-fields",
+ * "message": "Some of the fields given do not exist in the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant1"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `catalog_not_found` | Check that the catalog name is valid. |
+ * | `ids_not_string` | Confirm that each item ID is a string. |
+ * | `ids_not_unique` | Check that each item ID is unique. |
+ * | `ids_too_large` | Character limit for each item ID is 250 characters. |
+ * | `item_array_invalid` | `items` must be an array of objects. |
+ * | `items_missing_ids` | Confirm that each item has an ID. |
+ * | `items_too_large` | Item values can't exceed 5,000 characters. |
+ * | `invalid_ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid_fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid_keys_in_value_object` | Item object keys can't include `.` or `$`. |
+ * | `too_deep_nesting_in_value_object` | Item objects can't have more than 50 levels of nesting.
+ * | `request_includes_too_many_items` | Your request has too many items. The item limit per request is 50. |
+ * | `unable_to_coerce_value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'PUT';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}'], [$this->catalog_name], '/catalogs/{catalog_name}/items');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemBadRequestException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemUnauthorizedException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemForbiddenException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemNotFoundException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemTooManyRequestsException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\PutCatalogsByCatalogNameItemBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PutCatalogsByCatalogNameItemByItemId.php b/lib/Endpoint/PutCatalogsByCatalogNameItemByItemId.php
new file mode 100644
index 0000000..839bdb1
--- /dev/null
+++ b/lib/Endpoint/PutCatalogsByCatalogNameItemByItemId.php
@@ -0,0 +1,217 @@
+ Use this endpoint to update an item in your catalog.
+ *
+ * To use this endpoint, you'll need to generate an API key with the `catalogs.replace_item` permission.
+ *
+ * If the `item_id` isn't found, this endpoint will create the item. This endpoint is synchronous.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `catalog_name` | Required | String | Name of the catalog. |
+ * | `item_id` | Required | String | The ID of the catalog item. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request PUT 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-REST-API-KEY' \
+ * --data-raw '{
+ * "items": [
+ * {
+ * "Name": "Restaurant",
+ * "Loyalty_Program": false,
+ * "Location": {
+ * "Latitude": 33.6112,
+ * "Longitude": -117.8711
+ * },
+ * "Open_Time": "2021-09-03T09:03:19.967+00:00"
+ * }
+ * ]
+ * }'
+ *
+ * ```
+ *
+ * ## Response
+ *
+ * There are three status code responses for this endpoint: `200`, `400`, and `404`.
+ *
+ * ### Example success response
+ *
+ * The status code `200` could return the following response body.
+ *
+ * ``` json
+ * {
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * ### Example error response
+ *
+ * The status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.
+ *
+ * ``` json
+ * {
+ * "errors": [
+ * {
+ * "id": "invalid-fields",
+ * "message": "Some of the fields given do not exist in the catalog",
+ * "parameters": [
+ * "id"
+ * ],
+ * "parameter_values": [
+ * "restaurant1"
+ * ]
+ * }
+ * ],
+ * "message": "Invalid Request"
+ * }
+ *
+ * ```
+ *
+ * ## Troubleshooting
+ *
+ * The following table lists possible returned errors and their associated troubleshooting steps.
+ *
+ * | Error | Troubleshooting |
+ * | --- | --- |
+ * | `already_reached_catalog_item_limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |
+ * | `already_reached_company_item_limit` | Maximum number of items reached. Contact your Braze account manager for more information. |
+ * | `arbitrary_error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |
+ * | `catalog_not_found` | Check that the catalog name is valid. |
+ * | `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |
+ * | `id_in_body` | Remove any item IDs in the request body. |
+ * | `ids_too_large` | Character limit for each item ID is 250 characters. |
+ * | `invalid_ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |
+ * | `invalid_fields` | Confirm that the fields in the request exist in the catalog. |
+ * | `invalid_keys_in_value_object` | Item object keys can't include `.` or `$`. |
+ * | `item_already_exists` | The item already exists in the catalog. |
+ * | `item_array_invalid` | `items` must be an array of objects. |
+ * | `items_too_large` | Item values can't exceed 5,000 characters. |
+ * | `request_includes_too_many_items` | Your request has too many items. The item limit per request is 50. |
+ * | `too_deep_nesting_in_value_object` | Item objects can't have more than 50 levels of nesting. |
+ * | `unable_to_coerce_value` | Item types can't be converted. |
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $catalogName, string $itemId, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->catalog_name = $catalogName;
+ $this->item_id = $itemId;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'PUT';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{catalog_name}', '{item_id}'], [$this->catalog_name, $this->item_id], '/catalogs/{catalog_name}/items/{item_id}');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdBadRequestException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdUnauthorizedException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdForbiddenException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdNotFoundException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdTooManyRequestsException
+ * @throws \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\PutCatalogsByCatalogNameItemByItemIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutCatalogsByCatalogNameItemByItemIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PutPreferenceCenterV1ByPreferenceCenterExternalID.php b/lib/Endpoint/PutPreferenceCenterV1ByPreferenceCenterExternalID.php
new file mode 100644
index 0000000..bf668c6
--- /dev/null
+++ b/lib/Endpoint/PutPreferenceCenterV1ByPreferenceCenterExternalID.php
@@ -0,0 +1,162 @@
+ Use this endpoint to update a preference center.
+ *
+ * To use this endpoint, you’ll need to generate an API key with the `preference_center.update` permission.
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 10 requests per minute, per workspace.
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preferenceCenterExternalID` | Required | String | The ID for your preference center. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `preference_center_page_html` | Required | String | The HTML for the preference center page. |
+ * | `preference_center_title` | Optional | String | The title for the preference center and confirmation pages. If a title is not specified, the title of the pages will default to "Preference Center". |
+ * | `confirmation_page_html` | Required | String | The HTML for the confirmation page. |
+ * | `state` | Optional | String | Choose `active` or `draft`. |
+ * | `options` | Optional | Object | Attributes: `meta-viewport-content`. When present, a `viewport` meta tag will be added to the page with `content=` . |
+ *
+ * ## Example request
+ *
+ * ```
+ * curl --location --request POST 'https://rest.iad-01.braze.com/preference_center/v1/{preferenceCenterExternalId}' \
+ * --header 'Content-Type: application/json' \
+ * --header 'Authorization: Bearer YOUR-API-KEY-HERE' \
+ * --data-raw '{
+ * "name": "Example",
+ * "preference_center_title": "Example Preference Center Title",
+ * "preference_center_page_html": "HTML for preference center here",
+ * "confirmation_page_html": "HTML here with a message to users here",
+ * "state": "active"
+ * }
+ * '
+ *
+ * ```
+ *
+ * ## Example response
+ *
+ * ```
+ * {
+ * "preference_center_api_id": "8efc52aa-935e-42b7-bd6b-98f43bb9b0f1",
+ * "created_at": "2022-09-22T18:28:07Z",
+ * "updated_at": "2022-09-22T18:32:07Z",
+ * "message": "success"
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string-Type
+ * @var string
+ * }
+ */
+ public function __construct(string $preferenceCenterExternalID, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->PreferenceCenterExternalID = $preferenceCenterExternalID;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'PUT';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{PreferenceCenterExternalID}'], [$this->PreferenceCenterExternalID], '/preference_center/v1/{PreferenceCenterExternalID}');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException
+ * @throws \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\PutPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Endpoint/PutScimV2UserById.php b/lib/Endpoint/PutScimV2UserById.php
new file mode 100644
index 0000000..f0b1142
--- /dev/null
+++ b/lib/Endpoint/PutScimV2UserById.php
@@ -0,0 +1,185 @@
+ This endpoint allows you to update an existing dashboard user account by specifying the resource `id` returned by the SCIM [`POST`](https://www.braze.com/docs/scim/post_create_user_account/) method.
+ *
+ * It allows you to update of given and family names, permissions (for setting permissions at the company, app group, and team level) and department. For information on how to obtain a SCIM token, visit [Automated user provisioning](https://www.braze.com/docs/scim/automated_user_provisioning/).
+ *
+ * For security reasons, `userName` (email address) cannot be updated through this endpoint. If you would like to change the `userName` (email address) for a user, contact [Support](https://www.braze.com/docs/support_contact/).
+ *
+ * ## Rate limit
+ *
+ * This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` GET, DELETE, and POST endpoints as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).
+ *
+ * ## Path parameters
+ *
+ * | Parameter | Required | Data Type | Description |
+ * | --- | --- | --- | --- |
+ * | `id` | Required | String | The user's resource ID. This parameter is returned by the `POST` `/scim/v2/Users/` or `GET` `/scim/v2/Users?filter=userName eq "user@test.com"` methods. |
+ *
+ * ## Request parameters
+ *
+ * | Parameter | Required | Data type | Description |
+ * | --- | --- | --- | --- |
+ * | `schemas` | Required | Array of strings | Expected SCIM 2.0 schema name for user object. |
+ * | `name` | Required | JSON object | This object contains the user's given name and family name. |
+ * | `department` | Required | String | Valid department string from the [department string documentation]({{site.baseurl}}/scim_api_appendix/#department-strings). |
+ * | `permissions` | Required | JSON object | Permissions object as described in the [permissions object documentation]({{site.baseurl}}/scim_api_appendix/#permissions-object). |
+ *
+ * ## Response
+ *
+ * ``` json
+ * {
+ * "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
+ * "id": "dfa245b7-24195aec-887bb3ad-602b3340",
+ * "userName": "user@test.com",
+ * "name": {
+ * "givenName": "Test",
+ * "familyName": "User"
+ * },
+ * "department": "finance",
+ * "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
+ * "permissions": {
+ * "companyPermissions": ["manage_company_settings"],
+ * "appGroup": [
+ * {
+ * "appGroupId": "241adcd25789fabcded",
+ * "appGroupName": "Test App Group",
+ * "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
+ * "team": [
+ * {
+ * "teamId": "2519dafcdba238ae7",
+ * "teamName": "Test Team",
+ * "teamPermissions": ["admin"]
+ * }
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ * ```
+ *
+ * ### Error states
+ *
+ * If a user with this ID doesn’t exist in Braze, the endpoint will respond with:
+ *
+ * ``` json
+ * HTTP/1.1 404 Not Found
+ * Content-Type: text/html; charset=UTF-8
+ * {
+ * "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
+ * "detail": "User not found",
+ * "status": 404
+ * }
+ *
+ * ```
+ *
+ * @param array $headerParameters {
+ *
+ * @var string $Content-Type
+ * @var string $X-Request-Origin
+ * @var string $Authorization
+ * }
+ */
+ public function __construct(string $id, \stdClass $requestBody = null, array $headerParameters = [])
+ {
+ $this->id = $id;
+ $this->body = $requestBody;
+ $this->headerParameters = $headerParameters;
+ }
+
+ public function getMethod(): string
+ {
+ return 'PUT';
+ }
+
+ public function getUri(): string
+ {
+ return str_replace(['{id}'], [$this->id], '/scim/v2/Users/{id}');
+ }
+
+ 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)];
+ }
+
+ return [[], null];
+ }
+
+ public function getExtraHeaders(): array
+ {
+ return ['Accept' => ['application/json']];
+ }
+
+ protected function getHeadersOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
+ {
+ $optionsResolver = parent::getHeadersOptionsResolver();
+ $optionsResolver->setDefined(['Content-Type', 'X-Request-Origin', 'Authorization']);
+ $optionsResolver->setRequired([]);
+ $optionsResolver->setDefaults([]);
+ $optionsResolver->addAllowedTypes('Content-Type', ['string']);
+ $optionsResolver->addAllowedTypes('X-Request-Origin', ['string']);
+ $optionsResolver->addAllowedTypes('Authorization', ['string']);
+
+ return $optionsResolver;
+ }
+
+ /**
+ * @return null
+ *
+ * @throws \Braze\Exception\PutScimV2UserByIdBadRequestException
+ * @throws \Braze\Exception\PutScimV2UserByIdUnauthorizedException
+ * @throws \Braze\Exception\PutScimV2UserByIdForbiddenException
+ * @throws \Braze\Exception\PutScimV2UserByIdNotFoundException
+ * @throws \Braze\Exception\PutScimV2UserByIdTooManyRequestsException
+ * @throws \Braze\Exception\PutScimV2UserByIdInternalServerErrorException
+ */
+ protected function transformResponseBody(\Psr\Http\Message\ResponseInterface $response, \Symfony\Component\Serializer\SerializerInterface $serializer, string $contentType = null)
+ {
+ $status = $response->getStatusCode();
+ $body = (string) $response->getBody();
+ if (is_null($contentType) === false && (200 === $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\PutScimV2UserByIdBadRequestException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (401 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutScimV2UserByIdUnauthorizedException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (403 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutScimV2UserByIdForbiddenException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (404 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutScimV2UserByIdNotFoundException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (429 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutScimV2UserByIdTooManyRequestsException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ if (is_null($contentType) === false && (500 === $status && mb_strpos($contentType, 'application/json') !== false)) {
+ throw new \Braze\Exception\PutScimV2UserByIdInternalServerErrorException($serializer->deserialize($body, 'Braze\\Model\\Error', 'json'), $response);
+ }
+ }
+
+ public function getAuthenticationScopes(): array
+ {
+ return ['BearerAuth'];
+ }
+}
diff --git a/lib/Exception/ApiException.php b/lib/Exception/ApiException.php
new file mode 100644
index 0000000..a18221f
--- /dev/null
+++ b/lib/Exception/ApiException.php
@@ -0,0 +1,15 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogByCatalogNameForbiddenException.php b/lib/Exception/DeleteCatalogByCatalogNameForbiddenException.php
new file mode 100644
index 0000000..ef2add1
--- /dev/null
+++ b/lib/Exception/DeleteCatalogByCatalogNameForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogByCatalogNameInternalServerErrorException.php b/lib/Exception/DeleteCatalogByCatalogNameInternalServerErrorException.php
new file mode 100644
index 0000000..64b20cf
--- /dev/null
+++ b/lib/Exception/DeleteCatalogByCatalogNameInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogByCatalogNameNotFoundException.php b/lib/Exception/DeleteCatalogByCatalogNameNotFoundException.php
new file mode 100644
index 0000000..c82172a
--- /dev/null
+++ b/lib/Exception/DeleteCatalogByCatalogNameNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogByCatalogNameTooManyRequestsException.php b/lib/Exception/DeleteCatalogByCatalogNameTooManyRequestsException.php
new file mode 100644
index 0000000..57164db
--- /dev/null
+++ b/lib/Exception/DeleteCatalogByCatalogNameTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogByCatalogNameUnauthorizedException.php b/lib/Exception/DeleteCatalogByCatalogNameUnauthorizedException.php
new file mode 100644
index 0000000..dc42190
--- /dev/null
+++ b/lib/Exception/DeleteCatalogByCatalogNameUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemBadRequestException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemBadRequestException.php
new file mode 100644
index 0000000..ad39989
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdBadRequestException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdBadRequestException.php
new file mode 100644
index 0000000..6add7d5
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdForbiddenException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdForbiddenException.php
new file mode 100644
index 0000000..6b4a076
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
new file mode 100644
index 0000000..8f2c4e4
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdNotFoundException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdNotFoundException.php
new file mode 100644
index 0000000..30e19db
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
new file mode 100644
index 0000000..386a7cb
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdUnauthorizedException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
new file mode 100644
index 0000000..5856f7a
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemForbiddenException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemForbiddenException.php
new file mode 100644
index 0000000..9ef5601
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemInternalServerErrorException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemInternalServerErrorException.php
new file mode 100644
index 0000000..592e924
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemNotFoundException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemNotFoundException.php
new file mode 100644
index 0000000..c37d42f
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemTooManyRequestsException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemTooManyRequestsException.php
new file mode 100644
index 0000000..1fb2365
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteCatalogsByCatalogNameItemUnauthorizedException.php b/lib/Exception/DeleteCatalogsByCatalogNameItemUnauthorizedException.php
new file mode 100644
index 0000000..1f9a66b
--- /dev/null
+++ b/lib/Exception/DeleteCatalogsByCatalogNameItemUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteScimV2UserByIdBadRequestException.php b/lib/Exception/DeleteScimV2UserByIdBadRequestException.php
new file mode 100644
index 0000000..c40cba7
--- /dev/null
+++ b/lib/Exception/DeleteScimV2UserByIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteScimV2UserByIdForbiddenException.php b/lib/Exception/DeleteScimV2UserByIdForbiddenException.php
new file mode 100644
index 0000000..6d8d74b
--- /dev/null
+++ b/lib/Exception/DeleteScimV2UserByIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteScimV2UserByIdInternalServerErrorException.php b/lib/Exception/DeleteScimV2UserByIdInternalServerErrorException.php
new file mode 100644
index 0000000..cb395dd
--- /dev/null
+++ b/lib/Exception/DeleteScimV2UserByIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteScimV2UserByIdNotFoundException.php b/lib/Exception/DeleteScimV2UserByIdNotFoundException.php
new file mode 100644
index 0000000..3f361b8
--- /dev/null
+++ b/lib/Exception/DeleteScimV2UserByIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteScimV2UserByIdTooManyRequestsException.php b/lib/Exception/DeleteScimV2UserByIdTooManyRequestsException.php
new file mode 100644
index 0000000..966d9ff
--- /dev/null
+++ b/lib/Exception/DeleteScimV2UserByIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/DeleteScimV2UserByIdUnauthorizedException.php b/lib/Exception/DeleteScimV2UserByIdUnauthorizedException.php
new file mode 100644
index 0000000..49601ff
--- /dev/null
+++ b/lib/Exception/DeleteScimV2UserByIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/ForbiddenException.php b/lib/Exception/ForbiddenException.php
new file mode 100644
index 0000000..996ab85
--- /dev/null
+++ b/lib/Exception/ForbiddenException.php
@@ -0,0 +1,19 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDataSeriesForbiddenException.php b/lib/Exception/GetCampaignsDataSeriesForbiddenException.php
new file mode 100644
index 0000000..e41bce8
--- /dev/null
+++ b/lib/Exception/GetCampaignsDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDataSeriesInternalServerErrorException.php b/lib/Exception/GetCampaignsDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..3be4efd
--- /dev/null
+++ b/lib/Exception/GetCampaignsDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDataSeriesNotFoundException.php b/lib/Exception/GetCampaignsDataSeriesNotFoundException.php
new file mode 100644
index 0000000..a881bdb
--- /dev/null
+++ b/lib/Exception/GetCampaignsDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDataSeriesTooManyRequestsException.php b/lib/Exception/GetCampaignsDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..7133513
--- /dev/null
+++ b/lib/Exception/GetCampaignsDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDataSeriesUnauthorizedException.php b/lib/Exception/GetCampaignsDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..91cdc8a
--- /dev/null
+++ b/lib/Exception/GetCampaignsDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDetailBadRequestException.php b/lib/Exception/GetCampaignsDetailBadRequestException.php
new file mode 100644
index 0000000..8204b55
--- /dev/null
+++ b/lib/Exception/GetCampaignsDetailBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDetailForbiddenException.php b/lib/Exception/GetCampaignsDetailForbiddenException.php
new file mode 100644
index 0000000..468d17d
--- /dev/null
+++ b/lib/Exception/GetCampaignsDetailForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDetailInternalServerErrorException.php b/lib/Exception/GetCampaignsDetailInternalServerErrorException.php
new file mode 100644
index 0000000..a8ba84b
--- /dev/null
+++ b/lib/Exception/GetCampaignsDetailInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDetailNotFoundException.php b/lib/Exception/GetCampaignsDetailNotFoundException.php
new file mode 100644
index 0000000..3650ccb
--- /dev/null
+++ b/lib/Exception/GetCampaignsDetailNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDetailTooManyRequestsException.php b/lib/Exception/GetCampaignsDetailTooManyRequestsException.php
new file mode 100644
index 0000000..90849d7
--- /dev/null
+++ b/lib/Exception/GetCampaignsDetailTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsDetailUnauthorizedException.php b/lib/Exception/GetCampaignsDetailUnauthorizedException.php
new file mode 100644
index 0000000..b8c8a08
--- /dev/null
+++ b/lib/Exception/GetCampaignsDetailUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsListBadRequestException.php b/lib/Exception/GetCampaignsListBadRequestException.php
new file mode 100644
index 0000000..0078e96
--- /dev/null
+++ b/lib/Exception/GetCampaignsListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsListForbiddenException.php b/lib/Exception/GetCampaignsListForbiddenException.php
new file mode 100644
index 0000000..6e7f68f
--- /dev/null
+++ b/lib/Exception/GetCampaignsListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsListInternalServerErrorException.php b/lib/Exception/GetCampaignsListInternalServerErrorException.php
new file mode 100644
index 0000000..7aabfcb
--- /dev/null
+++ b/lib/Exception/GetCampaignsListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsListNotFoundException.php b/lib/Exception/GetCampaignsListNotFoundException.php
new file mode 100644
index 0000000..d5e36fb
--- /dev/null
+++ b/lib/Exception/GetCampaignsListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsListTooManyRequestsException.php b/lib/Exception/GetCampaignsListTooManyRequestsException.php
new file mode 100644
index 0000000..fb9ce31
--- /dev/null
+++ b/lib/Exception/GetCampaignsListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCampaignsListUnauthorizedException.php b/lib/Exception/GetCampaignsListUnauthorizedException.php
new file mode 100644
index 0000000..24f6cb0
--- /dev/null
+++ b/lib/Exception/GetCampaignsListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSeriesBadRequestException.php b/lib/Exception/GetCanvasDataSeriesBadRequestException.php
new file mode 100644
index 0000000..a413503
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSeriesForbiddenException.php b/lib/Exception/GetCanvasDataSeriesForbiddenException.php
new file mode 100644
index 0000000..5d1aee4
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSeriesInternalServerErrorException.php b/lib/Exception/GetCanvasDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..f95e007
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSeriesNotFoundException.php b/lib/Exception/GetCanvasDataSeriesNotFoundException.php
new file mode 100644
index 0000000..0a45cd7
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSeriesTooManyRequestsException.php b/lib/Exception/GetCanvasDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..44324f5
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSeriesUnauthorizedException.php b/lib/Exception/GetCanvasDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..70293ee
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSummaryBadRequestException.php b/lib/Exception/GetCanvasDataSummaryBadRequestException.php
new file mode 100644
index 0000000..25ca70b
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSummaryBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSummaryForbiddenException.php b/lib/Exception/GetCanvasDataSummaryForbiddenException.php
new file mode 100644
index 0000000..b2c3528
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSummaryForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSummaryInternalServerErrorException.php b/lib/Exception/GetCanvasDataSummaryInternalServerErrorException.php
new file mode 100644
index 0000000..a1b02bf
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSummaryInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSummaryNotFoundException.php b/lib/Exception/GetCanvasDataSummaryNotFoundException.php
new file mode 100644
index 0000000..0ea660c
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSummaryNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSummaryTooManyRequestsException.php b/lib/Exception/GetCanvasDataSummaryTooManyRequestsException.php
new file mode 100644
index 0000000..cb91094
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSummaryTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDataSummaryUnauthorizedException.php b/lib/Exception/GetCanvasDataSummaryUnauthorizedException.php
new file mode 100644
index 0000000..543523c
--- /dev/null
+++ b/lib/Exception/GetCanvasDataSummaryUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDetailBadRequestException.php b/lib/Exception/GetCanvasDetailBadRequestException.php
new file mode 100644
index 0000000..925f8da
--- /dev/null
+++ b/lib/Exception/GetCanvasDetailBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDetailForbiddenException.php b/lib/Exception/GetCanvasDetailForbiddenException.php
new file mode 100644
index 0000000..4a31c15
--- /dev/null
+++ b/lib/Exception/GetCanvasDetailForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDetailInternalServerErrorException.php b/lib/Exception/GetCanvasDetailInternalServerErrorException.php
new file mode 100644
index 0000000..23e8f57
--- /dev/null
+++ b/lib/Exception/GetCanvasDetailInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDetailNotFoundException.php b/lib/Exception/GetCanvasDetailNotFoundException.php
new file mode 100644
index 0000000..ebaf59e
--- /dev/null
+++ b/lib/Exception/GetCanvasDetailNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDetailTooManyRequestsException.php b/lib/Exception/GetCanvasDetailTooManyRequestsException.php
new file mode 100644
index 0000000..b2c64ee
--- /dev/null
+++ b/lib/Exception/GetCanvasDetailTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasDetailUnauthorizedException.php b/lib/Exception/GetCanvasDetailUnauthorizedException.php
new file mode 100644
index 0000000..418b96d
--- /dev/null
+++ b/lib/Exception/GetCanvasDetailUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasListBadRequestException.php b/lib/Exception/GetCanvasListBadRequestException.php
new file mode 100644
index 0000000..08c4931
--- /dev/null
+++ b/lib/Exception/GetCanvasListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasListForbiddenException.php b/lib/Exception/GetCanvasListForbiddenException.php
new file mode 100644
index 0000000..07cf705
--- /dev/null
+++ b/lib/Exception/GetCanvasListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasListInternalServerErrorException.php b/lib/Exception/GetCanvasListInternalServerErrorException.php
new file mode 100644
index 0000000..d11f5c5
--- /dev/null
+++ b/lib/Exception/GetCanvasListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasListNotFoundException.php b/lib/Exception/GetCanvasListNotFoundException.php
new file mode 100644
index 0000000..6244193
--- /dev/null
+++ b/lib/Exception/GetCanvasListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasListTooManyRequestsException.php b/lib/Exception/GetCanvasListTooManyRequestsException.php
new file mode 100644
index 0000000..ac382e1
--- /dev/null
+++ b/lib/Exception/GetCanvasListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCanvasListUnauthorizedException.php b/lib/Exception/GetCanvasListUnauthorizedException.php
new file mode 100644
index 0000000..dbdf8da
--- /dev/null
+++ b/lib/Exception/GetCanvasListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogBadRequestException.php b/lib/Exception/GetCatalogBadRequestException.php
new file mode 100644
index 0000000..39f0776
--- /dev/null
+++ b/lib/Exception/GetCatalogBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogForbiddenException.php b/lib/Exception/GetCatalogForbiddenException.php
new file mode 100644
index 0000000..3835049
--- /dev/null
+++ b/lib/Exception/GetCatalogForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogInternalServerErrorException.php b/lib/Exception/GetCatalogInternalServerErrorException.php
new file mode 100644
index 0000000..d8db3a4
--- /dev/null
+++ b/lib/Exception/GetCatalogInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogNotFoundException.php b/lib/Exception/GetCatalogNotFoundException.php
new file mode 100644
index 0000000..1e0edaf
--- /dev/null
+++ b/lib/Exception/GetCatalogNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogTooManyRequestsException.php b/lib/Exception/GetCatalogTooManyRequestsException.php
new file mode 100644
index 0000000..cf137b5
--- /dev/null
+++ b/lib/Exception/GetCatalogTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogUnauthorizedException.php b/lib/Exception/GetCatalogUnauthorizedException.php
new file mode 100644
index 0000000..5fce801
--- /dev/null
+++ b/lib/Exception/GetCatalogUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemBadRequestException.php b/lib/Exception/GetCatalogsByCatalogNameItemBadRequestException.php
new file mode 100644
index 0000000..493b804
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemByItemIdBadRequestException.php b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdBadRequestException.php
new file mode 100644
index 0000000..f7f6747
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemByItemIdForbiddenException.php b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdForbiddenException.php
new file mode 100644
index 0000000..02d4f9e
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
new file mode 100644
index 0000000..294d383
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemByItemIdNotFoundException.php b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdNotFoundException.php
new file mode 100644
index 0000000..ecce076
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
new file mode 100644
index 0000000..0e069d1
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemByItemIdUnauthorizedException.php b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
new file mode 100644
index 0000000..b4576d7
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemForbiddenException.php b/lib/Exception/GetCatalogsByCatalogNameItemForbiddenException.php
new file mode 100644
index 0000000..95028ee
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemInternalServerErrorException.php b/lib/Exception/GetCatalogsByCatalogNameItemInternalServerErrorException.php
new file mode 100644
index 0000000..598b3d5
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemNotFoundException.php b/lib/Exception/GetCatalogsByCatalogNameItemNotFoundException.php
new file mode 100644
index 0000000..fe4ff77
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemTooManyRequestsException.php b/lib/Exception/GetCatalogsByCatalogNameItemTooManyRequestsException.php
new file mode 100644
index 0000000..feec2b9
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetCatalogsByCatalogNameItemUnauthorizedException.php b/lib/Exception/GetCatalogsByCatalogNameItemUnauthorizedException.php
new file mode 100644
index 0000000..87208db
--- /dev/null
+++ b/lib/Exception/GetCatalogsByCatalogNameItemUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksInfoBadRequestException.php b/lib/Exception/GetContentBlocksInfoBadRequestException.php
new file mode 100644
index 0000000..51d8c45
--- /dev/null
+++ b/lib/Exception/GetContentBlocksInfoBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksInfoForbiddenException.php b/lib/Exception/GetContentBlocksInfoForbiddenException.php
new file mode 100644
index 0000000..cf7df6c
--- /dev/null
+++ b/lib/Exception/GetContentBlocksInfoForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksInfoInternalServerErrorException.php b/lib/Exception/GetContentBlocksInfoInternalServerErrorException.php
new file mode 100644
index 0000000..f9fbe56
--- /dev/null
+++ b/lib/Exception/GetContentBlocksInfoInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksInfoNotFoundException.php b/lib/Exception/GetContentBlocksInfoNotFoundException.php
new file mode 100644
index 0000000..630f937
--- /dev/null
+++ b/lib/Exception/GetContentBlocksInfoNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksInfoTooManyRequestsException.php b/lib/Exception/GetContentBlocksInfoTooManyRequestsException.php
new file mode 100644
index 0000000..5d9dc1a
--- /dev/null
+++ b/lib/Exception/GetContentBlocksInfoTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksInfoUnauthorizedException.php b/lib/Exception/GetContentBlocksInfoUnauthorizedException.php
new file mode 100644
index 0000000..b5bdb36
--- /dev/null
+++ b/lib/Exception/GetContentBlocksInfoUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksListBadRequestException.php b/lib/Exception/GetContentBlocksListBadRequestException.php
new file mode 100644
index 0000000..05f859e
--- /dev/null
+++ b/lib/Exception/GetContentBlocksListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksListForbiddenException.php b/lib/Exception/GetContentBlocksListForbiddenException.php
new file mode 100644
index 0000000..8b46f0f
--- /dev/null
+++ b/lib/Exception/GetContentBlocksListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksListInternalServerErrorException.php b/lib/Exception/GetContentBlocksListInternalServerErrorException.php
new file mode 100644
index 0000000..1cdd7a5
--- /dev/null
+++ b/lib/Exception/GetContentBlocksListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksListNotFoundException.php b/lib/Exception/GetContentBlocksListNotFoundException.php
new file mode 100644
index 0000000..e8a1129
--- /dev/null
+++ b/lib/Exception/GetContentBlocksListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksListTooManyRequestsException.php b/lib/Exception/GetContentBlocksListTooManyRequestsException.php
new file mode 100644
index 0000000..6cbffd8
--- /dev/null
+++ b/lib/Exception/GetContentBlocksListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetContentBlocksListUnauthorizedException.php b/lib/Exception/GetContentBlocksListUnauthorizedException.php
new file mode 100644
index 0000000..ce00ec6
--- /dev/null
+++ b/lib/Exception/GetContentBlocksListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailHardBounceBadRequestException.php b/lib/Exception/GetEmailHardBounceBadRequestException.php
new file mode 100644
index 0000000..4c1f97c
--- /dev/null
+++ b/lib/Exception/GetEmailHardBounceBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailHardBounceForbiddenException.php b/lib/Exception/GetEmailHardBounceForbiddenException.php
new file mode 100644
index 0000000..28a4445
--- /dev/null
+++ b/lib/Exception/GetEmailHardBounceForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailHardBounceInternalServerErrorException.php b/lib/Exception/GetEmailHardBounceInternalServerErrorException.php
new file mode 100644
index 0000000..db515c2
--- /dev/null
+++ b/lib/Exception/GetEmailHardBounceInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailHardBounceNotFoundException.php b/lib/Exception/GetEmailHardBounceNotFoundException.php
new file mode 100644
index 0000000..4cd9d7e
--- /dev/null
+++ b/lib/Exception/GetEmailHardBounceNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailHardBounceTooManyRequestsException.php b/lib/Exception/GetEmailHardBounceTooManyRequestsException.php
new file mode 100644
index 0000000..5e1ed87
--- /dev/null
+++ b/lib/Exception/GetEmailHardBounceTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailHardBounceUnauthorizedException.php b/lib/Exception/GetEmailHardBounceUnauthorizedException.php
new file mode 100644
index 0000000..5754d44
--- /dev/null
+++ b/lib/Exception/GetEmailHardBounceUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailUnsubscribeBadRequestException.php b/lib/Exception/GetEmailUnsubscribeBadRequestException.php
new file mode 100644
index 0000000..c4fdd31
--- /dev/null
+++ b/lib/Exception/GetEmailUnsubscribeBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailUnsubscribeForbiddenException.php b/lib/Exception/GetEmailUnsubscribeForbiddenException.php
new file mode 100644
index 0000000..cd34ad7
--- /dev/null
+++ b/lib/Exception/GetEmailUnsubscribeForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailUnsubscribeInternalServerErrorException.php b/lib/Exception/GetEmailUnsubscribeInternalServerErrorException.php
new file mode 100644
index 0000000..6431bd0
--- /dev/null
+++ b/lib/Exception/GetEmailUnsubscribeInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailUnsubscribeNotFoundException.php b/lib/Exception/GetEmailUnsubscribeNotFoundException.php
new file mode 100644
index 0000000..beddd9f
--- /dev/null
+++ b/lib/Exception/GetEmailUnsubscribeNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailUnsubscribeTooManyRequestsException.php b/lib/Exception/GetEmailUnsubscribeTooManyRequestsException.php
new file mode 100644
index 0000000..318e1ea
--- /dev/null
+++ b/lib/Exception/GetEmailUnsubscribeTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEmailUnsubscribeUnauthorizedException.php b/lib/Exception/GetEmailUnsubscribeUnauthorizedException.php
new file mode 100644
index 0000000..241b677
--- /dev/null
+++ b/lib/Exception/GetEmailUnsubscribeUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsDataSeriesBadRequestException.php b/lib/Exception/GetEventsDataSeriesBadRequestException.php
new file mode 100644
index 0000000..562a981
--- /dev/null
+++ b/lib/Exception/GetEventsDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsDataSeriesForbiddenException.php b/lib/Exception/GetEventsDataSeriesForbiddenException.php
new file mode 100644
index 0000000..99174b5
--- /dev/null
+++ b/lib/Exception/GetEventsDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsDataSeriesInternalServerErrorException.php b/lib/Exception/GetEventsDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..1d8fb82
--- /dev/null
+++ b/lib/Exception/GetEventsDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsDataSeriesNotFoundException.php b/lib/Exception/GetEventsDataSeriesNotFoundException.php
new file mode 100644
index 0000000..9ee52dd
--- /dev/null
+++ b/lib/Exception/GetEventsDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsDataSeriesTooManyRequestsException.php b/lib/Exception/GetEventsDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..26a0909
--- /dev/null
+++ b/lib/Exception/GetEventsDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsDataSeriesUnauthorizedException.php b/lib/Exception/GetEventsDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..32197ba
--- /dev/null
+++ b/lib/Exception/GetEventsDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsListBadRequestException.php b/lib/Exception/GetEventsListBadRequestException.php
new file mode 100644
index 0000000..98aea87
--- /dev/null
+++ b/lib/Exception/GetEventsListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsListForbiddenException.php b/lib/Exception/GetEventsListForbiddenException.php
new file mode 100644
index 0000000..5a171af
--- /dev/null
+++ b/lib/Exception/GetEventsListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsListInternalServerErrorException.php b/lib/Exception/GetEventsListInternalServerErrorException.php
new file mode 100644
index 0000000..ab7850a
--- /dev/null
+++ b/lib/Exception/GetEventsListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsListNotFoundException.php b/lib/Exception/GetEventsListNotFoundException.php
new file mode 100644
index 0000000..e8e59a7
--- /dev/null
+++ b/lib/Exception/GetEventsListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsListTooManyRequestsException.php b/lib/Exception/GetEventsListTooManyRequestsException.php
new file mode 100644
index 0000000..81f92a4
--- /dev/null
+++ b/lib/Exception/GetEventsListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetEventsListUnauthorizedException.php b/lib/Exception/GetEventsListUnauthorizedException.php
new file mode 100644
index 0000000..f63cc30
--- /dev/null
+++ b/lib/Exception/GetEventsListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDataSeriesBadRequestException.php b/lib/Exception/GetFeedDataSeriesBadRequestException.php
new file mode 100644
index 0000000..e4aa654
--- /dev/null
+++ b/lib/Exception/GetFeedDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDataSeriesForbiddenException.php b/lib/Exception/GetFeedDataSeriesForbiddenException.php
new file mode 100644
index 0000000..1a7a133
--- /dev/null
+++ b/lib/Exception/GetFeedDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDataSeriesInternalServerErrorException.php b/lib/Exception/GetFeedDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..2c59a14
--- /dev/null
+++ b/lib/Exception/GetFeedDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDataSeriesNotFoundException.php b/lib/Exception/GetFeedDataSeriesNotFoundException.php
new file mode 100644
index 0000000..df455fc
--- /dev/null
+++ b/lib/Exception/GetFeedDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDataSeriesTooManyRequestsException.php b/lib/Exception/GetFeedDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..c8acf1f
--- /dev/null
+++ b/lib/Exception/GetFeedDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDataSeriesUnauthorizedException.php b/lib/Exception/GetFeedDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..fa6ec32
--- /dev/null
+++ b/lib/Exception/GetFeedDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDetailBadRequestException.php b/lib/Exception/GetFeedDetailBadRequestException.php
new file mode 100644
index 0000000..1498883
--- /dev/null
+++ b/lib/Exception/GetFeedDetailBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDetailForbiddenException.php b/lib/Exception/GetFeedDetailForbiddenException.php
new file mode 100644
index 0000000..496b111
--- /dev/null
+++ b/lib/Exception/GetFeedDetailForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDetailInternalServerErrorException.php b/lib/Exception/GetFeedDetailInternalServerErrorException.php
new file mode 100644
index 0000000..5a2a54d
--- /dev/null
+++ b/lib/Exception/GetFeedDetailInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDetailNotFoundException.php b/lib/Exception/GetFeedDetailNotFoundException.php
new file mode 100644
index 0000000..ce732fb
--- /dev/null
+++ b/lib/Exception/GetFeedDetailNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDetailTooManyRequestsException.php b/lib/Exception/GetFeedDetailTooManyRequestsException.php
new file mode 100644
index 0000000..1d24a54
--- /dev/null
+++ b/lib/Exception/GetFeedDetailTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedDetailUnauthorizedException.php b/lib/Exception/GetFeedDetailUnauthorizedException.php
new file mode 100644
index 0000000..185ff30
--- /dev/null
+++ b/lib/Exception/GetFeedDetailUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedListBadRequestException.php b/lib/Exception/GetFeedListBadRequestException.php
new file mode 100644
index 0000000..6a3fa87
--- /dev/null
+++ b/lib/Exception/GetFeedListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedListForbiddenException.php b/lib/Exception/GetFeedListForbiddenException.php
new file mode 100644
index 0000000..df20b4f
--- /dev/null
+++ b/lib/Exception/GetFeedListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedListInternalServerErrorException.php b/lib/Exception/GetFeedListInternalServerErrorException.php
new file mode 100644
index 0000000..b53aab9
--- /dev/null
+++ b/lib/Exception/GetFeedListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedListNotFoundException.php b/lib/Exception/GetFeedListNotFoundException.php
new file mode 100644
index 0000000..8d7818b
--- /dev/null
+++ b/lib/Exception/GetFeedListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedListTooManyRequestsException.php b/lib/Exception/GetFeedListTooManyRequestsException.php
new file mode 100644
index 0000000..fa8c87b
--- /dev/null
+++ b/lib/Exception/GetFeedListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetFeedListUnauthorizedException.php b/lib/Exception/GetFeedListUnauthorizedException.php
new file mode 100644
index 0000000..04b1d13
--- /dev/null
+++ b/lib/Exception/GetFeedListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiDauDataSeriesBadRequestException.php b/lib/Exception/GetKpiDauDataSeriesBadRequestException.php
new file mode 100644
index 0000000..a1cd6c4
--- /dev/null
+++ b/lib/Exception/GetKpiDauDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiDauDataSeriesForbiddenException.php b/lib/Exception/GetKpiDauDataSeriesForbiddenException.php
new file mode 100644
index 0000000..5d2dac2
--- /dev/null
+++ b/lib/Exception/GetKpiDauDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiDauDataSeriesInternalServerErrorException.php b/lib/Exception/GetKpiDauDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..527c7e2
--- /dev/null
+++ b/lib/Exception/GetKpiDauDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiDauDataSeriesNotFoundException.php b/lib/Exception/GetKpiDauDataSeriesNotFoundException.php
new file mode 100644
index 0000000..dc8e4a9
--- /dev/null
+++ b/lib/Exception/GetKpiDauDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiDauDataSeriesTooManyRequestsException.php b/lib/Exception/GetKpiDauDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..d132558
--- /dev/null
+++ b/lib/Exception/GetKpiDauDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiDauDataSeriesUnauthorizedException.php b/lib/Exception/GetKpiDauDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..ee0e2dc
--- /dev/null
+++ b/lib/Exception/GetKpiDauDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiMauDataSeriesBadRequestException.php b/lib/Exception/GetKpiMauDataSeriesBadRequestException.php
new file mode 100644
index 0000000..2c2b5a8
--- /dev/null
+++ b/lib/Exception/GetKpiMauDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiMauDataSeriesForbiddenException.php b/lib/Exception/GetKpiMauDataSeriesForbiddenException.php
new file mode 100644
index 0000000..233fbf7
--- /dev/null
+++ b/lib/Exception/GetKpiMauDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiMauDataSeriesInternalServerErrorException.php b/lib/Exception/GetKpiMauDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..70f7763
--- /dev/null
+++ b/lib/Exception/GetKpiMauDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiMauDataSeriesNotFoundException.php b/lib/Exception/GetKpiMauDataSeriesNotFoundException.php
new file mode 100644
index 0000000..cd07a9e
--- /dev/null
+++ b/lib/Exception/GetKpiMauDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiMauDataSeriesTooManyRequestsException.php b/lib/Exception/GetKpiMauDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..dd4801a
--- /dev/null
+++ b/lib/Exception/GetKpiMauDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiMauDataSeriesUnauthorizedException.php b/lib/Exception/GetKpiMauDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..898c72d
--- /dev/null
+++ b/lib/Exception/GetKpiMauDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiNewUsersDataSeriesBadRequestException.php b/lib/Exception/GetKpiNewUsersDataSeriesBadRequestException.php
new file mode 100644
index 0000000..f5a134c
--- /dev/null
+++ b/lib/Exception/GetKpiNewUsersDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiNewUsersDataSeriesForbiddenException.php b/lib/Exception/GetKpiNewUsersDataSeriesForbiddenException.php
new file mode 100644
index 0000000..19d69aa
--- /dev/null
+++ b/lib/Exception/GetKpiNewUsersDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiNewUsersDataSeriesInternalServerErrorException.php b/lib/Exception/GetKpiNewUsersDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..860034f
--- /dev/null
+++ b/lib/Exception/GetKpiNewUsersDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiNewUsersDataSeriesNotFoundException.php b/lib/Exception/GetKpiNewUsersDataSeriesNotFoundException.php
new file mode 100644
index 0000000..e52aef4
--- /dev/null
+++ b/lib/Exception/GetKpiNewUsersDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiNewUsersDataSeriesTooManyRequestsException.php b/lib/Exception/GetKpiNewUsersDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..81e6c56
--- /dev/null
+++ b/lib/Exception/GetKpiNewUsersDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiNewUsersDataSeriesUnauthorizedException.php b/lib/Exception/GetKpiNewUsersDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..ed3316b
--- /dev/null
+++ b/lib/Exception/GetKpiNewUsersDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiUninstallsDataSeriesBadRequestException.php b/lib/Exception/GetKpiUninstallsDataSeriesBadRequestException.php
new file mode 100644
index 0000000..7eea3a6
--- /dev/null
+++ b/lib/Exception/GetKpiUninstallsDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiUninstallsDataSeriesForbiddenException.php b/lib/Exception/GetKpiUninstallsDataSeriesForbiddenException.php
new file mode 100644
index 0000000..dfc49a8
--- /dev/null
+++ b/lib/Exception/GetKpiUninstallsDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiUninstallsDataSeriesInternalServerErrorException.php b/lib/Exception/GetKpiUninstallsDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..da4797b
--- /dev/null
+++ b/lib/Exception/GetKpiUninstallsDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiUninstallsDataSeriesNotFoundException.php b/lib/Exception/GetKpiUninstallsDataSeriesNotFoundException.php
new file mode 100644
index 0000000..f6cb9d9
--- /dev/null
+++ b/lib/Exception/GetKpiUninstallsDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiUninstallsDataSeriesTooManyRequestsException.php b/lib/Exception/GetKpiUninstallsDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..e08ad58
--- /dev/null
+++ b/lib/Exception/GetKpiUninstallsDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetKpiUninstallsDataSeriesUnauthorizedException.php b/lib/Exception/GetKpiUninstallsDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..bcbfb65
--- /dev/null
+++ b/lib/Exception/GetKpiUninstallsDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetMessagesScheduledBroadcastBadRequestException.php b/lib/Exception/GetMessagesScheduledBroadcastBadRequestException.php
new file mode 100644
index 0000000..d69d7bc
--- /dev/null
+++ b/lib/Exception/GetMessagesScheduledBroadcastBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetMessagesScheduledBroadcastForbiddenException.php b/lib/Exception/GetMessagesScheduledBroadcastForbiddenException.php
new file mode 100644
index 0000000..4a8a56e
--- /dev/null
+++ b/lib/Exception/GetMessagesScheduledBroadcastForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetMessagesScheduledBroadcastInternalServerErrorException.php b/lib/Exception/GetMessagesScheduledBroadcastInternalServerErrorException.php
new file mode 100644
index 0000000..b0b0e31
--- /dev/null
+++ b/lib/Exception/GetMessagesScheduledBroadcastInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetMessagesScheduledBroadcastNotFoundException.php b/lib/Exception/GetMessagesScheduledBroadcastNotFoundException.php
new file mode 100644
index 0000000..e4e501a
--- /dev/null
+++ b/lib/Exception/GetMessagesScheduledBroadcastNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetMessagesScheduledBroadcastTooManyRequestsException.php b/lib/Exception/GetMessagesScheduledBroadcastTooManyRequestsException.php
new file mode 100644
index 0000000..20f1619
--- /dev/null
+++ b/lib/Exception/GetMessagesScheduledBroadcastTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetMessagesScheduledBroadcastUnauthorizedException.php b/lib/Exception/GetMessagesScheduledBroadcastUnauthorizedException.php
new file mode 100644
index 0000000..f40836b
--- /dev/null
+++ b/lib/Exception/GetMessagesScheduledBroadcastUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException.php
new file mode 100644
index 0000000..932adfb
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException.php
new file mode 100644
index 0000000..698d438
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException.php
new file mode 100644
index 0000000..51c787c
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException.php
new file mode 100644
index 0000000..f13759f
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException.php
new file mode 100644
index 0000000..e226f07
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException.php
new file mode 100644
index 0000000..7715f20
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDBadRequestException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDBadRequestException.php
new file mode 100644
index 0000000..675faa6
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDForbiddenException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDForbiddenException.php
new file mode 100644
index 0000000..c531156
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDInternalServerErrorException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDInternalServerErrorException.php
new file mode 100644
index 0000000..087f5e5
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDNotFoundException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDNotFoundException.php
new file mode 100644
index 0000000..d0963a1
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDTooManyRequestsException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDTooManyRequestsException.php
new file mode 100644
index 0000000..8e6b45c
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDUnauthorizedException.php b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDUnauthorizedException.php
new file mode 100644
index 0000000..1d08b0b
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ByPreferenceCenterExternalIDUrlByUserIDUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ListBadRequestException.php b/lib/Exception/GetPreferenceCenterV1ListBadRequestException.php
new file mode 100644
index 0000000..827e38a
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ListForbiddenException.php b/lib/Exception/GetPreferenceCenterV1ListForbiddenException.php
new file mode 100644
index 0000000..f2f94ca
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ListInternalServerErrorException.php b/lib/Exception/GetPreferenceCenterV1ListInternalServerErrorException.php
new file mode 100644
index 0000000..bb366e3
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ListNotFoundException.php b/lib/Exception/GetPreferenceCenterV1ListNotFoundException.php
new file mode 100644
index 0000000..ac13499
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ListTooManyRequestsException.php b/lib/Exception/GetPreferenceCenterV1ListTooManyRequestsException.php
new file mode 100644
index 0000000..ac5f7a8
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPreferenceCenterV1ListUnauthorizedException.php b/lib/Exception/GetPreferenceCenterV1ListUnauthorizedException.php
new file mode 100644
index 0000000..caceeb5
--- /dev/null
+++ b/lib/Exception/GetPreferenceCenterV1ListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesProductListBadRequestException.php b/lib/Exception/GetPurchasesProductListBadRequestException.php
new file mode 100644
index 0000000..16a126a
--- /dev/null
+++ b/lib/Exception/GetPurchasesProductListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesProductListForbiddenException.php b/lib/Exception/GetPurchasesProductListForbiddenException.php
new file mode 100644
index 0000000..2bf84d4
--- /dev/null
+++ b/lib/Exception/GetPurchasesProductListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesProductListInternalServerErrorException.php b/lib/Exception/GetPurchasesProductListInternalServerErrorException.php
new file mode 100644
index 0000000..6635a99
--- /dev/null
+++ b/lib/Exception/GetPurchasesProductListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesProductListNotFoundException.php b/lib/Exception/GetPurchasesProductListNotFoundException.php
new file mode 100644
index 0000000..b171713
--- /dev/null
+++ b/lib/Exception/GetPurchasesProductListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesProductListTooManyRequestsException.php b/lib/Exception/GetPurchasesProductListTooManyRequestsException.php
new file mode 100644
index 0000000..9a8c126
--- /dev/null
+++ b/lib/Exception/GetPurchasesProductListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesProductListUnauthorizedException.php b/lib/Exception/GetPurchasesProductListUnauthorizedException.php
new file mode 100644
index 0000000..0c30ccd
--- /dev/null
+++ b/lib/Exception/GetPurchasesProductListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesQuantitySeriesBadRequestException.php b/lib/Exception/GetPurchasesQuantitySeriesBadRequestException.php
new file mode 100644
index 0000000..9f7122c
--- /dev/null
+++ b/lib/Exception/GetPurchasesQuantitySeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesQuantitySeriesForbiddenException.php b/lib/Exception/GetPurchasesQuantitySeriesForbiddenException.php
new file mode 100644
index 0000000..e7c9851
--- /dev/null
+++ b/lib/Exception/GetPurchasesQuantitySeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesQuantitySeriesInternalServerErrorException.php b/lib/Exception/GetPurchasesQuantitySeriesInternalServerErrorException.php
new file mode 100644
index 0000000..280283e
--- /dev/null
+++ b/lib/Exception/GetPurchasesQuantitySeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesQuantitySeriesNotFoundException.php b/lib/Exception/GetPurchasesQuantitySeriesNotFoundException.php
new file mode 100644
index 0000000..05e83e8
--- /dev/null
+++ b/lib/Exception/GetPurchasesQuantitySeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesQuantitySeriesTooManyRequestsException.php b/lib/Exception/GetPurchasesQuantitySeriesTooManyRequestsException.php
new file mode 100644
index 0000000..b726370
--- /dev/null
+++ b/lib/Exception/GetPurchasesQuantitySeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesQuantitySeriesUnauthorizedException.php b/lib/Exception/GetPurchasesQuantitySeriesUnauthorizedException.php
new file mode 100644
index 0000000..21cf44d
--- /dev/null
+++ b/lib/Exception/GetPurchasesQuantitySeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesRevenueSeriesBadRequestException.php b/lib/Exception/GetPurchasesRevenueSeriesBadRequestException.php
new file mode 100644
index 0000000..dbe20be
--- /dev/null
+++ b/lib/Exception/GetPurchasesRevenueSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesRevenueSeriesForbiddenException.php b/lib/Exception/GetPurchasesRevenueSeriesForbiddenException.php
new file mode 100644
index 0000000..0c47579
--- /dev/null
+++ b/lib/Exception/GetPurchasesRevenueSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesRevenueSeriesInternalServerErrorException.php b/lib/Exception/GetPurchasesRevenueSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..eb5cee9
--- /dev/null
+++ b/lib/Exception/GetPurchasesRevenueSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesRevenueSeriesNotFoundException.php b/lib/Exception/GetPurchasesRevenueSeriesNotFoundException.php
new file mode 100644
index 0000000..9f93c5a
--- /dev/null
+++ b/lib/Exception/GetPurchasesRevenueSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesRevenueSeriesTooManyRequestsException.php b/lib/Exception/GetPurchasesRevenueSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..b92bde1
--- /dev/null
+++ b/lib/Exception/GetPurchasesRevenueSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetPurchasesRevenueSeriesUnauthorizedException.php b/lib/Exception/GetPurchasesRevenueSeriesUnauthorizedException.php
new file mode 100644
index 0000000..59f1a1d
--- /dev/null
+++ b/lib/Exception/GetPurchasesRevenueSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserBadRequestException.php b/lib/Exception/GetScimV2UserBadRequestException.php
new file mode 100644
index 0000000..aecfb7b
--- /dev/null
+++ b/lib/Exception/GetScimV2UserBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserByIdBadRequestException.php b/lib/Exception/GetScimV2UserByIdBadRequestException.php
new file mode 100644
index 0000000..8a0e04a
--- /dev/null
+++ b/lib/Exception/GetScimV2UserByIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserByIdForbiddenException.php b/lib/Exception/GetScimV2UserByIdForbiddenException.php
new file mode 100644
index 0000000..7c44378
--- /dev/null
+++ b/lib/Exception/GetScimV2UserByIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserByIdInternalServerErrorException.php b/lib/Exception/GetScimV2UserByIdInternalServerErrorException.php
new file mode 100644
index 0000000..a983d23
--- /dev/null
+++ b/lib/Exception/GetScimV2UserByIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserByIdNotFoundException.php b/lib/Exception/GetScimV2UserByIdNotFoundException.php
new file mode 100644
index 0000000..319eda9
--- /dev/null
+++ b/lib/Exception/GetScimV2UserByIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserByIdTooManyRequestsException.php b/lib/Exception/GetScimV2UserByIdTooManyRequestsException.php
new file mode 100644
index 0000000..1a9e8a6
--- /dev/null
+++ b/lib/Exception/GetScimV2UserByIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserByIdUnauthorizedException.php b/lib/Exception/GetScimV2UserByIdUnauthorizedException.php
new file mode 100644
index 0000000..94a992c
--- /dev/null
+++ b/lib/Exception/GetScimV2UserByIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserForbiddenException.php b/lib/Exception/GetScimV2UserForbiddenException.php
new file mode 100644
index 0000000..49d234c
--- /dev/null
+++ b/lib/Exception/GetScimV2UserForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserInternalServerErrorException.php b/lib/Exception/GetScimV2UserInternalServerErrorException.php
new file mode 100644
index 0000000..48bcd01
--- /dev/null
+++ b/lib/Exception/GetScimV2UserInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserNotFoundException.php b/lib/Exception/GetScimV2UserNotFoundException.php
new file mode 100644
index 0000000..419680d
--- /dev/null
+++ b/lib/Exception/GetScimV2UserNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserTooManyRequestsException.php b/lib/Exception/GetScimV2UserTooManyRequestsException.php
new file mode 100644
index 0000000..e51a0e3
--- /dev/null
+++ b/lib/Exception/GetScimV2UserTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetScimV2UserUnauthorizedException.php b/lib/Exception/GetScimV2UserUnauthorizedException.php
new file mode 100644
index 0000000..dbdddce
--- /dev/null
+++ b/lib/Exception/GetScimV2UserUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDataSeriesBadRequestException.php b/lib/Exception/GetSegmentsDataSeriesBadRequestException.php
new file mode 100644
index 0000000..2903bad
--- /dev/null
+++ b/lib/Exception/GetSegmentsDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDataSeriesForbiddenException.php b/lib/Exception/GetSegmentsDataSeriesForbiddenException.php
new file mode 100644
index 0000000..f11c048
--- /dev/null
+++ b/lib/Exception/GetSegmentsDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDataSeriesInternalServerErrorException.php b/lib/Exception/GetSegmentsDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..dfdddd6
--- /dev/null
+++ b/lib/Exception/GetSegmentsDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDataSeriesNotFoundException.php b/lib/Exception/GetSegmentsDataSeriesNotFoundException.php
new file mode 100644
index 0000000..54bbe56
--- /dev/null
+++ b/lib/Exception/GetSegmentsDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDataSeriesTooManyRequestsException.php b/lib/Exception/GetSegmentsDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..8458315
--- /dev/null
+++ b/lib/Exception/GetSegmentsDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDataSeriesUnauthorizedException.php b/lib/Exception/GetSegmentsDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..e51528b
--- /dev/null
+++ b/lib/Exception/GetSegmentsDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDetailBadRequestException.php b/lib/Exception/GetSegmentsDetailBadRequestException.php
new file mode 100644
index 0000000..94eda28
--- /dev/null
+++ b/lib/Exception/GetSegmentsDetailBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDetailForbiddenException.php b/lib/Exception/GetSegmentsDetailForbiddenException.php
new file mode 100644
index 0000000..81f2b52
--- /dev/null
+++ b/lib/Exception/GetSegmentsDetailForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDetailInternalServerErrorException.php b/lib/Exception/GetSegmentsDetailInternalServerErrorException.php
new file mode 100644
index 0000000..27f3824
--- /dev/null
+++ b/lib/Exception/GetSegmentsDetailInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDetailNotFoundException.php b/lib/Exception/GetSegmentsDetailNotFoundException.php
new file mode 100644
index 0000000..12ecf0f
--- /dev/null
+++ b/lib/Exception/GetSegmentsDetailNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDetailTooManyRequestsException.php b/lib/Exception/GetSegmentsDetailTooManyRequestsException.php
new file mode 100644
index 0000000..0515d61
--- /dev/null
+++ b/lib/Exception/GetSegmentsDetailTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsDetailUnauthorizedException.php b/lib/Exception/GetSegmentsDetailUnauthorizedException.php
new file mode 100644
index 0000000..7440e44
--- /dev/null
+++ b/lib/Exception/GetSegmentsDetailUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsListBadRequestException.php b/lib/Exception/GetSegmentsListBadRequestException.php
new file mode 100644
index 0000000..2409eed
--- /dev/null
+++ b/lib/Exception/GetSegmentsListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsListForbiddenException.php b/lib/Exception/GetSegmentsListForbiddenException.php
new file mode 100644
index 0000000..dcf3cb9
--- /dev/null
+++ b/lib/Exception/GetSegmentsListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsListInternalServerErrorException.php b/lib/Exception/GetSegmentsListInternalServerErrorException.php
new file mode 100644
index 0000000..9bb98b5
--- /dev/null
+++ b/lib/Exception/GetSegmentsListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsListNotFoundException.php b/lib/Exception/GetSegmentsListNotFoundException.php
new file mode 100644
index 0000000..a2e7366
--- /dev/null
+++ b/lib/Exception/GetSegmentsListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsListTooManyRequestsException.php b/lib/Exception/GetSegmentsListTooManyRequestsException.php
new file mode 100644
index 0000000..c52e13b
--- /dev/null
+++ b/lib/Exception/GetSegmentsListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSegmentsListUnauthorizedException.php b/lib/Exception/GetSegmentsListUnauthorizedException.php
new file mode 100644
index 0000000..cb17760
--- /dev/null
+++ b/lib/Exception/GetSegmentsListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSendsDataSeriesBadRequestException.php b/lib/Exception/GetSendsDataSeriesBadRequestException.php
new file mode 100644
index 0000000..2689a93
--- /dev/null
+++ b/lib/Exception/GetSendsDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSendsDataSeriesForbiddenException.php b/lib/Exception/GetSendsDataSeriesForbiddenException.php
new file mode 100644
index 0000000..8efb8a3
--- /dev/null
+++ b/lib/Exception/GetSendsDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSendsDataSeriesInternalServerErrorException.php b/lib/Exception/GetSendsDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..55dbaeb
--- /dev/null
+++ b/lib/Exception/GetSendsDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSendsDataSeriesNotFoundException.php b/lib/Exception/GetSendsDataSeriesNotFoundException.php
new file mode 100644
index 0000000..0a2b9b6
--- /dev/null
+++ b/lib/Exception/GetSendsDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSendsDataSeriesTooManyRequestsException.php b/lib/Exception/GetSendsDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..247d35a
--- /dev/null
+++ b/lib/Exception/GetSendsDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSendsDataSeriesUnauthorizedException.php b/lib/Exception/GetSendsDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..e9d9a18
--- /dev/null
+++ b/lib/Exception/GetSendsDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSessionsDataSeriesBadRequestException.php b/lib/Exception/GetSessionsDataSeriesBadRequestException.php
new file mode 100644
index 0000000..16ce287
--- /dev/null
+++ b/lib/Exception/GetSessionsDataSeriesBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSessionsDataSeriesForbiddenException.php b/lib/Exception/GetSessionsDataSeriesForbiddenException.php
new file mode 100644
index 0000000..1c0226d
--- /dev/null
+++ b/lib/Exception/GetSessionsDataSeriesForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSessionsDataSeriesInternalServerErrorException.php b/lib/Exception/GetSessionsDataSeriesInternalServerErrorException.php
new file mode 100644
index 0000000..7a11c95
--- /dev/null
+++ b/lib/Exception/GetSessionsDataSeriesInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSessionsDataSeriesNotFoundException.php b/lib/Exception/GetSessionsDataSeriesNotFoundException.php
new file mode 100644
index 0000000..7c94e06
--- /dev/null
+++ b/lib/Exception/GetSessionsDataSeriesNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSessionsDataSeriesTooManyRequestsException.php b/lib/Exception/GetSessionsDataSeriesTooManyRequestsException.php
new file mode 100644
index 0000000..a781e93
--- /dev/null
+++ b/lib/Exception/GetSessionsDataSeriesTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSessionsDataSeriesUnauthorizedException.php b/lib/Exception/GetSessionsDataSeriesUnauthorizedException.php
new file mode 100644
index 0000000..d7ccdb8
--- /dev/null
+++ b/lib/Exception/GetSessionsDataSeriesUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSmsInvalidPhoneNumberBadRequestException.php b/lib/Exception/GetSmsInvalidPhoneNumberBadRequestException.php
new file mode 100644
index 0000000..522713c
--- /dev/null
+++ b/lib/Exception/GetSmsInvalidPhoneNumberBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSmsInvalidPhoneNumberForbiddenException.php b/lib/Exception/GetSmsInvalidPhoneNumberForbiddenException.php
new file mode 100644
index 0000000..ba7c8ae
--- /dev/null
+++ b/lib/Exception/GetSmsInvalidPhoneNumberForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSmsInvalidPhoneNumberInternalServerErrorException.php b/lib/Exception/GetSmsInvalidPhoneNumberInternalServerErrorException.php
new file mode 100644
index 0000000..b174f28
--- /dev/null
+++ b/lib/Exception/GetSmsInvalidPhoneNumberInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSmsInvalidPhoneNumberNotFoundException.php b/lib/Exception/GetSmsInvalidPhoneNumberNotFoundException.php
new file mode 100644
index 0000000..9c080c2
--- /dev/null
+++ b/lib/Exception/GetSmsInvalidPhoneNumberNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSmsInvalidPhoneNumberTooManyRequestsException.php b/lib/Exception/GetSmsInvalidPhoneNumberTooManyRequestsException.php
new file mode 100644
index 0000000..2e82425
--- /dev/null
+++ b/lib/Exception/GetSmsInvalidPhoneNumberTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSmsInvalidPhoneNumberUnauthorizedException.php b/lib/Exception/GetSmsInvalidPhoneNumberUnauthorizedException.php
new file mode 100644
index 0000000..9c2932a
--- /dev/null
+++ b/lib/Exception/GetSmsInvalidPhoneNumberUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionStatusGetBadRequestException.php b/lib/Exception/GetSubscriptionStatusGetBadRequestException.php
new file mode 100644
index 0000000..992400b
--- /dev/null
+++ b/lib/Exception/GetSubscriptionStatusGetBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionStatusGetForbiddenException.php b/lib/Exception/GetSubscriptionStatusGetForbiddenException.php
new file mode 100644
index 0000000..c10d653
--- /dev/null
+++ b/lib/Exception/GetSubscriptionStatusGetForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionStatusGetInternalServerErrorException.php b/lib/Exception/GetSubscriptionStatusGetInternalServerErrorException.php
new file mode 100644
index 0000000..dff6f4f
--- /dev/null
+++ b/lib/Exception/GetSubscriptionStatusGetInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionStatusGetNotFoundException.php b/lib/Exception/GetSubscriptionStatusGetNotFoundException.php
new file mode 100644
index 0000000..cfe1e86
--- /dev/null
+++ b/lib/Exception/GetSubscriptionStatusGetNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionStatusGetTooManyRequestsException.php b/lib/Exception/GetSubscriptionStatusGetTooManyRequestsException.php
new file mode 100644
index 0000000..f32ec83
--- /dev/null
+++ b/lib/Exception/GetSubscriptionStatusGetTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionStatusGetUnauthorizedException.php b/lib/Exception/GetSubscriptionStatusGetUnauthorizedException.php
new file mode 100644
index 0000000..2e81b54
--- /dev/null
+++ b/lib/Exception/GetSubscriptionStatusGetUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionUserStatusBadRequestException.php b/lib/Exception/GetSubscriptionUserStatusBadRequestException.php
new file mode 100644
index 0000000..8dd8fc9
--- /dev/null
+++ b/lib/Exception/GetSubscriptionUserStatusBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionUserStatusForbiddenException.php b/lib/Exception/GetSubscriptionUserStatusForbiddenException.php
new file mode 100644
index 0000000..f935283
--- /dev/null
+++ b/lib/Exception/GetSubscriptionUserStatusForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionUserStatusInternalServerErrorException.php b/lib/Exception/GetSubscriptionUserStatusInternalServerErrorException.php
new file mode 100644
index 0000000..b6fa7d2
--- /dev/null
+++ b/lib/Exception/GetSubscriptionUserStatusInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionUserStatusNotFoundException.php b/lib/Exception/GetSubscriptionUserStatusNotFoundException.php
new file mode 100644
index 0000000..7859e4a
--- /dev/null
+++ b/lib/Exception/GetSubscriptionUserStatusNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionUserStatusTooManyRequestsException.php b/lib/Exception/GetSubscriptionUserStatusTooManyRequestsException.php
new file mode 100644
index 0000000..87dda93
--- /dev/null
+++ b/lib/Exception/GetSubscriptionUserStatusTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetSubscriptionUserStatusUnauthorizedException.php b/lib/Exception/GetSubscriptionUserStatusUnauthorizedException.php
new file mode 100644
index 0000000..fa593ca
--- /dev/null
+++ b/lib/Exception/GetSubscriptionUserStatusUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailInfoBadRequestException.php b/lib/Exception/GetTemplatesEmailInfoBadRequestException.php
new file mode 100644
index 0000000..9fbfa56
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailInfoBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailInfoForbiddenException.php b/lib/Exception/GetTemplatesEmailInfoForbiddenException.php
new file mode 100644
index 0000000..433fdd9
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailInfoForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailInfoInternalServerErrorException.php b/lib/Exception/GetTemplatesEmailInfoInternalServerErrorException.php
new file mode 100644
index 0000000..caa8105
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailInfoInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailInfoNotFoundException.php b/lib/Exception/GetTemplatesEmailInfoNotFoundException.php
new file mode 100644
index 0000000..42b05da
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailInfoNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailInfoTooManyRequestsException.php b/lib/Exception/GetTemplatesEmailInfoTooManyRequestsException.php
new file mode 100644
index 0000000..a9a3594
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailInfoTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailInfoUnauthorizedException.php b/lib/Exception/GetTemplatesEmailInfoUnauthorizedException.php
new file mode 100644
index 0000000..efcd782
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailInfoUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailListBadRequestException.php b/lib/Exception/GetTemplatesEmailListBadRequestException.php
new file mode 100644
index 0000000..8ced59b
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailListBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailListForbiddenException.php b/lib/Exception/GetTemplatesEmailListForbiddenException.php
new file mode 100644
index 0000000..325a2cc
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailListForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailListInternalServerErrorException.php b/lib/Exception/GetTemplatesEmailListInternalServerErrorException.php
new file mode 100644
index 0000000..c914329
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailListInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailListNotFoundException.php b/lib/Exception/GetTemplatesEmailListNotFoundException.php
new file mode 100644
index 0000000..92fe56e
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailListNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailListTooManyRequestsException.php b/lib/Exception/GetTemplatesEmailListTooManyRequestsException.php
new file mode 100644
index 0000000..5ff64eb
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailListTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/GetTemplatesEmailListUnauthorizedException.php b/lib/Exception/GetTemplatesEmailListUnauthorizedException.php
new file mode 100644
index 0000000..9eda0ba
--- /dev/null
+++ b/lib/Exception/GetTemplatesEmailListUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/InternalServerErrorException.php b/lib/Exception/InternalServerErrorException.php
new file mode 100644
index 0000000..244feff
--- /dev/null
+++ b/lib/Exception/InternalServerErrorException.php
@@ -0,0 +1,19 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdBadRequestException.php b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdBadRequestException.php
new file mode 100644
index 0000000..6ff416e
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdForbiddenException.php b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdForbiddenException.php
new file mode 100644
index 0000000..ec4d8ba
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
new file mode 100644
index 0000000..58de0f3
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdNotFoundException.php b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdNotFoundException.php
new file mode 100644
index 0000000..096245e
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
new file mode 100644
index 0000000..32cccd9
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdUnauthorizedException.php b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
new file mode 100644
index 0000000..83a444b
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemForbiddenException.php b/lib/Exception/PatchCatalogsByCatalogNameItemForbiddenException.php
new file mode 100644
index 0000000..728db80
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemInternalServerErrorException.php b/lib/Exception/PatchCatalogsByCatalogNameItemInternalServerErrorException.php
new file mode 100644
index 0000000..02cf5ff
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemNotFoundException.php b/lib/Exception/PatchCatalogsByCatalogNameItemNotFoundException.php
new file mode 100644
index 0000000..d57f5ed
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemTooManyRequestsException.php b/lib/Exception/PatchCatalogsByCatalogNameItemTooManyRequestsException.php
new file mode 100644
index 0000000..fee2312
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PatchCatalogsByCatalogNameItemUnauthorizedException.php b/lib/Exception/PatchCatalogsByCatalogNameItemUnauthorizedException.php
new file mode 100644
index 0000000..3876884
--- /dev/null
+++ b/lib/Exception/PatchCatalogsByCatalogNameItemUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleCreateBadRequestException.php b/lib/Exception/PostCampaignsTriggerScheduleCreateBadRequestException.php
new file mode 100644
index 0000000..2f161bb
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleCreateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleCreateForbiddenException.php b/lib/Exception/PostCampaignsTriggerScheduleCreateForbiddenException.php
new file mode 100644
index 0000000..4c159ca
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleCreateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleCreateInternalServerErrorException.php b/lib/Exception/PostCampaignsTriggerScheduleCreateInternalServerErrorException.php
new file mode 100644
index 0000000..00d80d3
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleCreateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleCreateNotFoundException.php b/lib/Exception/PostCampaignsTriggerScheduleCreateNotFoundException.php
new file mode 100644
index 0000000..19a8869
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleCreateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleCreateTooManyRequestsException.php b/lib/Exception/PostCampaignsTriggerScheduleCreateTooManyRequestsException.php
new file mode 100644
index 0000000..d685b2a
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleCreateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleCreateUnauthorizedException.php b/lib/Exception/PostCampaignsTriggerScheduleCreateUnauthorizedException.php
new file mode 100644
index 0000000..19faa11
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleCreateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleDeleteBadRequestException.php b/lib/Exception/PostCampaignsTriggerScheduleDeleteBadRequestException.php
new file mode 100644
index 0000000..bb95f9b
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleDeleteBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleDeleteForbiddenException.php b/lib/Exception/PostCampaignsTriggerScheduleDeleteForbiddenException.php
new file mode 100644
index 0000000..45d2415
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleDeleteForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleDeleteInternalServerErrorException.php b/lib/Exception/PostCampaignsTriggerScheduleDeleteInternalServerErrorException.php
new file mode 100644
index 0000000..69e068c
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleDeleteInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleDeleteNotFoundException.php b/lib/Exception/PostCampaignsTriggerScheduleDeleteNotFoundException.php
new file mode 100644
index 0000000..854e6e7
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleDeleteNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleDeleteTooManyRequestsException.php b/lib/Exception/PostCampaignsTriggerScheduleDeleteTooManyRequestsException.php
new file mode 100644
index 0000000..4f827c0
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleDeleteTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleDeleteUnauthorizedException.php b/lib/Exception/PostCampaignsTriggerScheduleDeleteUnauthorizedException.php
new file mode 100644
index 0000000..5511bf3
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleDeleteUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleUpdateBadRequestException.php b/lib/Exception/PostCampaignsTriggerScheduleUpdateBadRequestException.php
new file mode 100644
index 0000000..d822f41
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleUpdateForbiddenException.php b/lib/Exception/PostCampaignsTriggerScheduleUpdateForbiddenException.php
new file mode 100644
index 0000000..5f96613
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleUpdateInternalServerErrorException.php b/lib/Exception/PostCampaignsTriggerScheduleUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..e1a378a
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleUpdateNotFoundException.php b/lib/Exception/PostCampaignsTriggerScheduleUpdateNotFoundException.php
new file mode 100644
index 0000000..1f48e50
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleUpdateTooManyRequestsException.php b/lib/Exception/PostCampaignsTriggerScheduleUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..e4ba658
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerScheduleUpdateUnauthorizedException.php b/lib/Exception/PostCampaignsTriggerScheduleUpdateUnauthorizedException.php
new file mode 100644
index 0000000..058d3fb
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerScheduleUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerSendBadRequestException.php b/lib/Exception/PostCampaignsTriggerSendBadRequestException.php
new file mode 100644
index 0000000..4f5d762
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerSendBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerSendForbiddenException.php b/lib/Exception/PostCampaignsTriggerSendForbiddenException.php
new file mode 100644
index 0000000..5a86784
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerSendForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerSendInternalServerErrorException.php b/lib/Exception/PostCampaignsTriggerSendInternalServerErrorException.php
new file mode 100644
index 0000000..1523a9c
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerSendInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerSendNotFoundException.php b/lib/Exception/PostCampaignsTriggerSendNotFoundException.php
new file mode 100644
index 0000000..1953f23
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerSendNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerSendTooManyRequestsException.php b/lib/Exception/PostCampaignsTriggerSendTooManyRequestsException.php
new file mode 100644
index 0000000..a2e48fd
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerSendTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCampaignsTriggerSendUnauthorizedException.php b/lib/Exception/PostCampaignsTriggerSendUnauthorizedException.php
new file mode 100644
index 0000000..760049e
--- /dev/null
+++ b/lib/Exception/PostCampaignsTriggerSendUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleCreateBadRequestException.php b/lib/Exception/PostCanvasTriggerScheduleCreateBadRequestException.php
new file mode 100644
index 0000000..84f9780
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleCreateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleCreateForbiddenException.php b/lib/Exception/PostCanvasTriggerScheduleCreateForbiddenException.php
new file mode 100644
index 0000000..cc66b07
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleCreateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleCreateInternalServerErrorException.php b/lib/Exception/PostCanvasTriggerScheduleCreateInternalServerErrorException.php
new file mode 100644
index 0000000..1177b64
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleCreateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleCreateNotFoundException.php b/lib/Exception/PostCanvasTriggerScheduleCreateNotFoundException.php
new file mode 100644
index 0000000..900a61f
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleCreateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleCreateTooManyRequestsException.php b/lib/Exception/PostCanvasTriggerScheduleCreateTooManyRequestsException.php
new file mode 100644
index 0000000..c043c0d
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleCreateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleCreateUnauthorizedException.php b/lib/Exception/PostCanvasTriggerScheduleCreateUnauthorizedException.php
new file mode 100644
index 0000000..5a3c3ea
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleCreateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleDeleteBadRequestException.php b/lib/Exception/PostCanvasTriggerScheduleDeleteBadRequestException.php
new file mode 100644
index 0000000..6562dfb
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleDeleteBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleDeleteForbiddenException.php b/lib/Exception/PostCanvasTriggerScheduleDeleteForbiddenException.php
new file mode 100644
index 0000000..87b6fa1
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleDeleteForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleDeleteInternalServerErrorException.php b/lib/Exception/PostCanvasTriggerScheduleDeleteInternalServerErrorException.php
new file mode 100644
index 0000000..52992ba
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleDeleteInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleDeleteNotFoundException.php b/lib/Exception/PostCanvasTriggerScheduleDeleteNotFoundException.php
new file mode 100644
index 0000000..b48ab0e
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleDeleteNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleDeleteTooManyRequestsException.php b/lib/Exception/PostCanvasTriggerScheduleDeleteTooManyRequestsException.php
new file mode 100644
index 0000000..decdfc3
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleDeleteTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleDeleteUnauthorizedException.php b/lib/Exception/PostCanvasTriggerScheduleDeleteUnauthorizedException.php
new file mode 100644
index 0000000..10d025b
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleDeleteUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleUpdateBadRequestException.php b/lib/Exception/PostCanvasTriggerScheduleUpdateBadRequestException.php
new file mode 100644
index 0000000..67e3dc6
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleUpdateForbiddenException.php b/lib/Exception/PostCanvasTriggerScheduleUpdateForbiddenException.php
new file mode 100644
index 0000000..0892a07
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleUpdateInternalServerErrorException.php b/lib/Exception/PostCanvasTriggerScheduleUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..c9d8cbb
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleUpdateNotFoundException.php b/lib/Exception/PostCanvasTriggerScheduleUpdateNotFoundException.php
new file mode 100644
index 0000000..8453ce2
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleUpdateTooManyRequestsException.php b/lib/Exception/PostCanvasTriggerScheduleUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..8981475
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerScheduleUpdateUnauthorizedException.php b/lib/Exception/PostCanvasTriggerScheduleUpdateUnauthorizedException.php
new file mode 100644
index 0000000..17340ed
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerScheduleUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerSendBadRequestException.php b/lib/Exception/PostCanvasTriggerSendBadRequestException.php
new file mode 100644
index 0000000..82de058
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerSendBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerSendForbiddenException.php b/lib/Exception/PostCanvasTriggerSendForbiddenException.php
new file mode 100644
index 0000000..acbdc35
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerSendForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerSendInternalServerErrorException.php b/lib/Exception/PostCanvasTriggerSendInternalServerErrorException.php
new file mode 100644
index 0000000..0d61438
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerSendInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerSendNotFoundException.php b/lib/Exception/PostCanvasTriggerSendNotFoundException.php
new file mode 100644
index 0000000..28c7018
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerSendNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerSendTooManyRequestsException.php b/lib/Exception/PostCanvasTriggerSendTooManyRequestsException.php
new file mode 100644
index 0000000..e24002b
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerSendTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCanvasTriggerSendUnauthorizedException.php b/lib/Exception/PostCanvasTriggerSendUnauthorizedException.php
new file mode 100644
index 0000000..b046e49
--- /dev/null
+++ b/lib/Exception/PostCanvasTriggerSendUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogBadRequestException.php b/lib/Exception/PostCatalogBadRequestException.php
new file mode 100644
index 0000000..1a0c446
--- /dev/null
+++ b/lib/Exception/PostCatalogBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogForbiddenException.php b/lib/Exception/PostCatalogForbiddenException.php
new file mode 100644
index 0000000..5350a5e
--- /dev/null
+++ b/lib/Exception/PostCatalogForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogInternalServerErrorException.php b/lib/Exception/PostCatalogInternalServerErrorException.php
new file mode 100644
index 0000000..5cf892e
--- /dev/null
+++ b/lib/Exception/PostCatalogInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogNotFoundException.php b/lib/Exception/PostCatalogNotFoundException.php
new file mode 100644
index 0000000..83858fb
--- /dev/null
+++ b/lib/Exception/PostCatalogNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogTooManyRequestsException.php b/lib/Exception/PostCatalogTooManyRequestsException.php
new file mode 100644
index 0000000..bc04083
--- /dev/null
+++ b/lib/Exception/PostCatalogTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogUnauthorizedException.php b/lib/Exception/PostCatalogUnauthorizedException.php
new file mode 100644
index 0000000..07f202a
--- /dev/null
+++ b/lib/Exception/PostCatalogUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemBadRequestException.php b/lib/Exception/PostCatalogsByCatalogNameItemBadRequestException.php
new file mode 100644
index 0000000..7dc2841
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemByItemIdBadRequestException.php b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdBadRequestException.php
new file mode 100644
index 0000000..fcb8a2e
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemByItemIdForbiddenException.php b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdForbiddenException.php
new file mode 100644
index 0000000..eba9819
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
new file mode 100644
index 0000000..4f83849
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemByItemIdNotFoundException.php b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdNotFoundException.php
new file mode 100644
index 0000000..dcccfa0
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
new file mode 100644
index 0000000..1d469da
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemByItemIdUnauthorizedException.php b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
new file mode 100644
index 0000000..c6b69b8
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemForbiddenException.php b/lib/Exception/PostCatalogsByCatalogNameItemForbiddenException.php
new file mode 100644
index 0000000..4ad73e7
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemInternalServerErrorException.php b/lib/Exception/PostCatalogsByCatalogNameItemInternalServerErrorException.php
new file mode 100644
index 0000000..7a96c4a
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemNotFoundException.php b/lib/Exception/PostCatalogsByCatalogNameItemNotFoundException.php
new file mode 100644
index 0000000..bc32e44
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemTooManyRequestsException.php b/lib/Exception/PostCatalogsByCatalogNameItemTooManyRequestsException.php
new file mode 100644
index 0000000..6887f92
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostCatalogsByCatalogNameItemUnauthorizedException.php b/lib/Exception/PostCatalogsByCatalogNameItemUnauthorizedException.php
new file mode 100644
index 0000000..30931e9
--- /dev/null
+++ b/lib/Exception/PostCatalogsByCatalogNameItemUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksCreateBadRequestException.php b/lib/Exception/PostContentBlocksCreateBadRequestException.php
new file mode 100644
index 0000000..07972e8
--- /dev/null
+++ b/lib/Exception/PostContentBlocksCreateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksCreateForbiddenException.php b/lib/Exception/PostContentBlocksCreateForbiddenException.php
new file mode 100644
index 0000000..cb5ebb1
--- /dev/null
+++ b/lib/Exception/PostContentBlocksCreateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksCreateInternalServerErrorException.php b/lib/Exception/PostContentBlocksCreateInternalServerErrorException.php
new file mode 100644
index 0000000..ed0c8dd
--- /dev/null
+++ b/lib/Exception/PostContentBlocksCreateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksCreateNotFoundException.php b/lib/Exception/PostContentBlocksCreateNotFoundException.php
new file mode 100644
index 0000000..015098c
--- /dev/null
+++ b/lib/Exception/PostContentBlocksCreateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksCreateTooManyRequestsException.php b/lib/Exception/PostContentBlocksCreateTooManyRequestsException.php
new file mode 100644
index 0000000..04b631c
--- /dev/null
+++ b/lib/Exception/PostContentBlocksCreateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksCreateUnauthorizedException.php b/lib/Exception/PostContentBlocksCreateUnauthorizedException.php
new file mode 100644
index 0000000..4832ab1
--- /dev/null
+++ b/lib/Exception/PostContentBlocksCreateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksUpdateBadRequestException.php b/lib/Exception/PostContentBlocksUpdateBadRequestException.php
new file mode 100644
index 0000000..e4c68c1
--- /dev/null
+++ b/lib/Exception/PostContentBlocksUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksUpdateForbiddenException.php b/lib/Exception/PostContentBlocksUpdateForbiddenException.php
new file mode 100644
index 0000000..e40fd31
--- /dev/null
+++ b/lib/Exception/PostContentBlocksUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksUpdateInternalServerErrorException.php b/lib/Exception/PostContentBlocksUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..4d2d0b9
--- /dev/null
+++ b/lib/Exception/PostContentBlocksUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksUpdateNotFoundException.php b/lib/Exception/PostContentBlocksUpdateNotFoundException.php
new file mode 100644
index 0000000..3bfe0fa
--- /dev/null
+++ b/lib/Exception/PostContentBlocksUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksUpdateTooManyRequestsException.php b/lib/Exception/PostContentBlocksUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..cd06095
--- /dev/null
+++ b/lib/Exception/PostContentBlocksUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostContentBlocksUpdateUnauthorizedException.php b/lib/Exception/PostContentBlocksUpdateUnauthorizedException.php
new file mode 100644
index 0000000..8edfdbd
--- /dev/null
+++ b/lib/Exception/PostContentBlocksUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlacklistBadRequestException.php b/lib/Exception/PostEmailBlacklistBadRequestException.php
new file mode 100644
index 0000000..c8a1941
--- /dev/null
+++ b/lib/Exception/PostEmailBlacklistBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlacklistForbiddenException.php b/lib/Exception/PostEmailBlacklistForbiddenException.php
new file mode 100644
index 0000000..1c53130
--- /dev/null
+++ b/lib/Exception/PostEmailBlacklistForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlacklistInternalServerErrorException.php b/lib/Exception/PostEmailBlacklistInternalServerErrorException.php
new file mode 100644
index 0000000..3e5d5b1
--- /dev/null
+++ b/lib/Exception/PostEmailBlacklistInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlacklistNotFoundException.php b/lib/Exception/PostEmailBlacklistNotFoundException.php
new file mode 100644
index 0000000..c5be11a
--- /dev/null
+++ b/lib/Exception/PostEmailBlacklistNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlacklistTooManyRequestsException.php b/lib/Exception/PostEmailBlacklistTooManyRequestsException.php
new file mode 100644
index 0000000..f6e33e4
--- /dev/null
+++ b/lib/Exception/PostEmailBlacklistTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlacklistUnauthorizedException.php b/lib/Exception/PostEmailBlacklistUnauthorizedException.php
new file mode 100644
index 0000000..e4c4deb
--- /dev/null
+++ b/lib/Exception/PostEmailBlacklistUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlocklistBadRequestException.php b/lib/Exception/PostEmailBlocklistBadRequestException.php
new file mode 100644
index 0000000..eaab044
--- /dev/null
+++ b/lib/Exception/PostEmailBlocklistBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlocklistForbiddenException.php b/lib/Exception/PostEmailBlocklistForbiddenException.php
new file mode 100644
index 0000000..022b76b
--- /dev/null
+++ b/lib/Exception/PostEmailBlocklistForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlocklistInternalServerErrorException.php b/lib/Exception/PostEmailBlocklistInternalServerErrorException.php
new file mode 100644
index 0000000..9396fae
--- /dev/null
+++ b/lib/Exception/PostEmailBlocklistInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlocklistNotFoundException.php b/lib/Exception/PostEmailBlocklistNotFoundException.php
new file mode 100644
index 0000000..69912f3
--- /dev/null
+++ b/lib/Exception/PostEmailBlocklistNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlocklistTooManyRequestsException.php b/lib/Exception/PostEmailBlocklistTooManyRequestsException.php
new file mode 100644
index 0000000..b886071
--- /dev/null
+++ b/lib/Exception/PostEmailBlocklistTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBlocklistUnauthorizedException.php b/lib/Exception/PostEmailBlocklistUnauthorizedException.php
new file mode 100644
index 0000000..76c14f8
--- /dev/null
+++ b/lib/Exception/PostEmailBlocklistUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBounceRemoveBadRequestException.php b/lib/Exception/PostEmailBounceRemoveBadRequestException.php
new file mode 100644
index 0000000..2c6090d
--- /dev/null
+++ b/lib/Exception/PostEmailBounceRemoveBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBounceRemoveForbiddenException.php b/lib/Exception/PostEmailBounceRemoveForbiddenException.php
new file mode 100644
index 0000000..3a8692d
--- /dev/null
+++ b/lib/Exception/PostEmailBounceRemoveForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBounceRemoveInternalServerErrorException.php b/lib/Exception/PostEmailBounceRemoveInternalServerErrorException.php
new file mode 100644
index 0000000..3ff637f
--- /dev/null
+++ b/lib/Exception/PostEmailBounceRemoveInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBounceRemoveNotFoundException.php b/lib/Exception/PostEmailBounceRemoveNotFoundException.php
new file mode 100644
index 0000000..ddaa74d
--- /dev/null
+++ b/lib/Exception/PostEmailBounceRemoveNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBounceRemoveTooManyRequestsException.php b/lib/Exception/PostEmailBounceRemoveTooManyRequestsException.php
new file mode 100644
index 0000000..865d8aa
--- /dev/null
+++ b/lib/Exception/PostEmailBounceRemoveTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailBounceRemoveUnauthorizedException.php b/lib/Exception/PostEmailBounceRemoveUnauthorizedException.php
new file mode 100644
index 0000000..a33a20b
--- /dev/null
+++ b/lib/Exception/PostEmailBounceRemoveUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailSpamRemoveBadRequestException.php b/lib/Exception/PostEmailSpamRemoveBadRequestException.php
new file mode 100644
index 0000000..40e1aa3
--- /dev/null
+++ b/lib/Exception/PostEmailSpamRemoveBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailSpamRemoveForbiddenException.php b/lib/Exception/PostEmailSpamRemoveForbiddenException.php
new file mode 100644
index 0000000..553fca0
--- /dev/null
+++ b/lib/Exception/PostEmailSpamRemoveForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailSpamRemoveInternalServerErrorException.php b/lib/Exception/PostEmailSpamRemoveInternalServerErrorException.php
new file mode 100644
index 0000000..c891fff
--- /dev/null
+++ b/lib/Exception/PostEmailSpamRemoveInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailSpamRemoveNotFoundException.php b/lib/Exception/PostEmailSpamRemoveNotFoundException.php
new file mode 100644
index 0000000..2365dfa
--- /dev/null
+++ b/lib/Exception/PostEmailSpamRemoveNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailSpamRemoveTooManyRequestsException.php b/lib/Exception/PostEmailSpamRemoveTooManyRequestsException.php
new file mode 100644
index 0000000..0615463
--- /dev/null
+++ b/lib/Exception/PostEmailSpamRemoveTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailSpamRemoveUnauthorizedException.php b/lib/Exception/PostEmailSpamRemoveUnauthorizedException.php
new file mode 100644
index 0000000..7f483d4
--- /dev/null
+++ b/lib/Exception/PostEmailSpamRemoveUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailStatusBadRequestException.php b/lib/Exception/PostEmailStatusBadRequestException.php
new file mode 100644
index 0000000..bfebf76
--- /dev/null
+++ b/lib/Exception/PostEmailStatusBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailStatusForbiddenException.php b/lib/Exception/PostEmailStatusForbiddenException.php
new file mode 100644
index 0000000..68fdee7
--- /dev/null
+++ b/lib/Exception/PostEmailStatusForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailStatusInternalServerErrorException.php b/lib/Exception/PostEmailStatusInternalServerErrorException.php
new file mode 100644
index 0000000..7b670b2
--- /dev/null
+++ b/lib/Exception/PostEmailStatusInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailStatusNotFoundException.php b/lib/Exception/PostEmailStatusNotFoundException.php
new file mode 100644
index 0000000..8da7314
--- /dev/null
+++ b/lib/Exception/PostEmailStatusNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailStatusTooManyRequestsException.php b/lib/Exception/PostEmailStatusTooManyRequestsException.php
new file mode 100644
index 0000000..5444239
--- /dev/null
+++ b/lib/Exception/PostEmailStatusTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostEmailStatusUnauthorizedException.php b/lib/Exception/PostEmailStatusUnauthorizedException.php
new file mode 100644
index 0000000..edadd67
--- /dev/null
+++ b/lib/Exception/PostEmailStatusUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesLiveActivityUpdateBadRequestException.php b/lib/Exception/PostMessagesLiveActivityUpdateBadRequestException.php
new file mode 100644
index 0000000..b10707f
--- /dev/null
+++ b/lib/Exception/PostMessagesLiveActivityUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesLiveActivityUpdateForbiddenException.php b/lib/Exception/PostMessagesLiveActivityUpdateForbiddenException.php
new file mode 100644
index 0000000..45871b1
--- /dev/null
+++ b/lib/Exception/PostMessagesLiveActivityUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesLiveActivityUpdateInternalServerErrorException.php b/lib/Exception/PostMessagesLiveActivityUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..2239429
--- /dev/null
+++ b/lib/Exception/PostMessagesLiveActivityUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesLiveActivityUpdateNotFoundException.php b/lib/Exception/PostMessagesLiveActivityUpdateNotFoundException.php
new file mode 100644
index 0000000..8f817f5
--- /dev/null
+++ b/lib/Exception/PostMessagesLiveActivityUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesLiveActivityUpdateTooManyRequestsException.php b/lib/Exception/PostMessagesLiveActivityUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..49540df
--- /dev/null
+++ b/lib/Exception/PostMessagesLiveActivityUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesLiveActivityUpdateUnauthorizedException.php b/lib/Exception/PostMessagesLiveActivityUpdateUnauthorizedException.php
new file mode 100644
index 0000000..101c264
--- /dev/null
+++ b/lib/Exception/PostMessagesLiveActivityUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleCreateBadRequestException.php b/lib/Exception/PostMessagesScheduleCreateBadRequestException.php
new file mode 100644
index 0000000..ae435ab
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleCreateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleCreateForbiddenException.php b/lib/Exception/PostMessagesScheduleCreateForbiddenException.php
new file mode 100644
index 0000000..1d68402
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleCreateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleCreateInternalServerErrorException.php b/lib/Exception/PostMessagesScheduleCreateInternalServerErrorException.php
new file mode 100644
index 0000000..19d72b9
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleCreateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleCreateNotFoundException.php b/lib/Exception/PostMessagesScheduleCreateNotFoundException.php
new file mode 100644
index 0000000..898eff2
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleCreateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleCreateTooManyRequestsException.php b/lib/Exception/PostMessagesScheduleCreateTooManyRequestsException.php
new file mode 100644
index 0000000..710a42f
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleCreateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleCreateUnauthorizedException.php b/lib/Exception/PostMessagesScheduleCreateUnauthorizedException.php
new file mode 100644
index 0000000..e95ecd5
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleCreateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleDeleteBadRequestException.php b/lib/Exception/PostMessagesScheduleDeleteBadRequestException.php
new file mode 100644
index 0000000..33b2be0
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleDeleteBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleDeleteForbiddenException.php b/lib/Exception/PostMessagesScheduleDeleteForbiddenException.php
new file mode 100644
index 0000000..e61b8ad
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleDeleteForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleDeleteInternalServerErrorException.php b/lib/Exception/PostMessagesScheduleDeleteInternalServerErrorException.php
new file mode 100644
index 0000000..733bc0f
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleDeleteInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleDeleteNotFoundException.php b/lib/Exception/PostMessagesScheduleDeleteNotFoundException.php
new file mode 100644
index 0000000..b3d043b
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleDeleteNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleDeleteTooManyRequestsException.php b/lib/Exception/PostMessagesScheduleDeleteTooManyRequestsException.php
new file mode 100644
index 0000000..537b845
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleDeleteTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleDeleteUnauthorizedException.php b/lib/Exception/PostMessagesScheduleDeleteUnauthorizedException.php
new file mode 100644
index 0000000..49bf455
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleDeleteUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleUpdateBadRequestException.php b/lib/Exception/PostMessagesScheduleUpdateBadRequestException.php
new file mode 100644
index 0000000..1e9ae7f
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleUpdateForbiddenException.php b/lib/Exception/PostMessagesScheduleUpdateForbiddenException.php
new file mode 100644
index 0000000..e7061fd
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleUpdateInternalServerErrorException.php b/lib/Exception/PostMessagesScheduleUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..9936f47
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleUpdateNotFoundException.php b/lib/Exception/PostMessagesScheduleUpdateNotFoundException.php
new file mode 100644
index 0000000..d086092
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleUpdateTooManyRequestsException.php b/lib/Exception/PostMessagesScheduleUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..e448e5a
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesScheduleUpdateUnauthorizedException.php b/lib/Exception/PostMessagesScheduleUpdateUnauthorizedException.php
new file mode 100644
index 0000000..0248640
--- /dev/null
+++ b/lib/Exception/PostMessagesScheduleUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesSendBadRequestException.php b/lib/Exception/PostMessagesSendBadRequestException.php
new file mode 100644
index 0000000..0cb19fc
--- /dev/null
+++ b/lib/Exception/PostMessagesSendBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesSendForbiddenException.php b/lib/Exception/PostMessagesSendForbiddenException.php
new file mode 100644
index 0000000..a378553
--- /dev/null
+++ b/lib/Exception/PostMessagesSendForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesSendInternalServerErrorException.php b/lib/Exception/PostMessagesSendInternalServerErrorException.php
new file mode 100644
index 0000000..9d25378
--- /dev/null
+++ b/lib/Exception/PostMessagesSendInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesSendNotFoundException.php b/lib/Exception/PostMessagesSendNotFoundException.php
new file mode 100644
index 0000000..cb07fae
--- /dev/null
+++ b/lib/Exception/PostMessagesSendNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesSendTooManyRequestsException.php b/lib/Exception/PostMessagesSendTooManyRequestsException.php
new file mode 100644
index 0000000..89c8d3b
--- /dev/null
+++ b/lib/Exception/PostMessagesSendTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostMessagesSendUnauthorizedException.php b/lib/Exception/PostMessagesSendUnauthorizedException.php
new file mode 100644
index 0000000..204f0c6
--- /dev/null
+++ b/lib/Exception/PostMessagesSendUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostPreferenceCenterV1BadRequestException.php b/lib/Exception/PostPreferenceCenterV1BadRequestException.php
new file mode 100644
index 0000000..f306004
--- /dev/null
+++ b/lib/Exception/PostPreferenceCenterV1BadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostPreferenceCenterV1ForbiddenException.php b/lib/Exception/PostPreferenceCenterV1ForbiddenException.php
new file mode 100644
index 0000000..14522f5
--- /dev/null
+++ b/lib/Exception/PostPreferenceCenterV1ForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostPreferenceCenterV1InternalServerErrorException.php b/lib/Exception/PostPreferenceCenterV1InternalServerErrorException.php
new file mode 100644
index 0000000..7bbf4d0
--- /dev/null
+++ b/lib/Exception/PostPreferenceCenterV1InternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostPreferenceCenterV1NotFoundException.php b/lib/Exception/PostPreferenceCenterV1NotFoundException.php
new file mode 100644
index 0000000..06c0381
--- /dev/null
+++ b/lib/Exception/PostPreferenceCenterV1NotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostPreferenceCenterV1TooManyRequestsException.php b/lib/Exception/PostPreferenceCenterV1TooManyRequestsException.php
new file mode 100644
index 0000000..9574db8
--- /dev/null
+++ b/lib/Exception/PostPreferenceCenterV1TooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostPreferenceCenterV1UnauthorizedException.php b/lib/Exception/PostPreferenceCenterV1UnauthorizedException.php
new file mode 100644
index 0000000..3ca6e60
--- /dev/null
+++ b/lib/Exception/PostPreferenceCenterV1UnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostScimV2UserBadRequestException.php b/lib/Exception/PostScimV2UserBadRequestException.php
new file mode 100644
index 0000000..d82bae9
--- /dev/null
+++ b/lib/Exception/PostScimV2UserBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostScimV2UserForbiddenException.php b/lib/Exception/PostScimV2UserForbiddenException.php
new file mode 100644
index 0000000..8bacba0
--- /dev/null
+++ b/lib/Exception/PostScimV2UserForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostScimV2UserInternalServerErrorException.php b/lib/Exception/PostScimV2UserInternalServerErrorException.php
new file mode 100644
index 0000000..acde34c
--- /dev/null
+++ b/lib/Exception/PostScimV2UserInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostScimV2UserNotFoundException.php b/lib/Exception/PostScimV2UserNotFoundException.php
new file mode 100644
index 0000000..7f10e17
--- /dev/null
+++ b/lib/Exception/PostScimV2UserNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostScimV2UserTooManyRequestsException.php b/lib/Exception/PostScimV2UserTooManyRequestsException.php
new file mode 100644
index 0000000..110af0d
--- /dev/null
+++ b/lib/Exception/PostScimV2UserTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostScimV2UserUnauthorizedException.php b/lib/Exception/PostScimV2UserUnauthorizedException.php
new file mode 100644
index 0000000..a378418
--- /dev/null
+++ b/lib/Exception/PostScimV2UserUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSendsIdCreateBadRequestException.php b/lib/Exception/PostSendsIdCreateBadRequestException.php
new file mode 100644
index 0000000..d9138b4
--- /dev/null
+++ b/lib/Exception/PostSendsIdCreateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSendsIdCreateForbiddenException.php b/lib/Exception/PostSendsIdCreateForbiddenException.php
new file mode 100644
index 0000000..36b2c85
--- /dev/null
+++ b/lib/Exception/PostSendsIdCreateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSendsIdCreateInternalServerErrorException.php b/lib/Exception/PostSendsIdCreateInternalServerErrorException.php
new file mode 100644
index 0000000..4342bc7
--- /dev/null
+++ b/lib/Exception/PostSendsIdCreateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSendsIdCreateNotFoundException.php b/lib/Exception/PostSendsIdCreateNotFoundException.php
new file mode 100644
index 0000000..0d7e298
--- /dev/null
+++ b/lib/Exception/PostSendsIdCreateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSendsIdCreateTooManyRequestsException.php b/lib/Exception/PostSendsIdCreateTooManyRequestsException.php
new file mode 100644
index 0000000..3d6c2b7
--- /dev/null
+++ b/lib/Exception/PostSendsIdCreateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSendsIdCreateUnauthorizedException.php b/lib/Exception/PostSendsIdCreateUnauthorizedException.php
new file mode 100644
index 0000000..924e6e2
--- /dev/null
+++ b/lib/Exception/PostSendsIdCreateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSmsInvalidPhoneNumbersRemoveBadRequestException.php b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveBadRequestException.php
new file mode 100644
index 0000000..7085b89
--- /dev/null
+++ b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSmsInvalidPhoneNumbersRemoveForbiddenException.php b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveForbiddenException.php
new file mode 100644
index 0000000..0f0a507
--- /dev/null
+++ b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSmsInvalidPhoneNumbersRemoveInternalServerErrorException.php b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveInternalServerErrorException.php
new file mode 100644
index 0000000..9d3933c
--- /dev/null
+++ b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSmsInvalidPhoneNumbersRemoveNotFoundException.php b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveNotFoundException.php
new file mode 100644
index 0000000..3bb7ff3
--- /dev/null
+++ b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSmsInvalidPhoneNumbersRemoveTooManyRequestsException.php b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveTooManyRequestsException.php
new file mode 100644
index 0000000..cc3d5fb
--- /dev/null
+++ b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSmsInvalidPhoneNumbersRemoveUnauthorizedException.php b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveUnauthorizedException.php
new file mode 100644
index 0000000..01a3a64
--- /dev/null
+++ b/lib/Exception/PostSmsInvalidPhoneNumbersRemoveUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSubscriptionStatusSetBadRequestException.php b/lib/Exception/PostSubscriptionStatusSetBadRequestException.php
new file mode 100644
index 0000000..75fb264
--- /dev/null
+++ b/lib/Exception/PostSubscriptionStatusSetBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSubscriptionStatusSetForbiddenException.php b/lib/Exception/PostSubscriptionStatusSetForbiddenException.php
new file mode 100644
index 0000000..d8ffcf0
--- /dev/null
+++ b/lib/Exception/PostSubscriptionStatusSetForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSubscriptionStatusSetInternalServerErrorException.php b/lib/Exception/PostSubscriptionStatusSetInternalServerErrorException.php
new file mode 100644
index 0000000..367c197
--- /dev/null
+++ b/lib/Exception/PostSubscriptionStatusSetInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSubscriptionStatusSetNotFoundException.php b/lib/Exception/PostSubscriptionStatusSetNotFoundException.php
new file mode 100644
index 0000000..3a0bce3
--- /dev/null
+++ b/lib/Exception/PostSubscriptionStatusSetNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSubscriptionStatusSetTooManyRequestsException.php b/lib/Exception/PostSubscriptionStatusSetTooManyRequestsException.php
new file mode 100644
index 0000000..cc8c955
--- /dev/null
+++ b/lib/Exception/PostSubscriptionStatusSetTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostSubscriptionStatusSetUnauthorizedException.php b/lib/Exception/PostSubscriptionStatusSetUnauthorizedException.php
new file mode 100644
index 0000000..444c097
--- /dev/null
+++ b/lib/Exception/PostSubscriptionStatusSetUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailCreateBadRequestException.php b/lib/Exception/PostTemplatesEmailCreateBadRequestException.php
new file mode 100644
index 0000000..86ab4d6
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailCreateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailCreateForbiddenException.php b/lib/Exception/PostTemplatesEmailCreateForbiddenException.php
new file mode 100644
index 0000000..b1e706f
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailCreateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailCreateInternalServerErrorException.php b/lib/Exception/PostTemplatesEmailCreateInternalServerErrorException.php
new file mode 100644
index 0000000..e2b6b99
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailCreateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailCreateNotFoundException.php b/lib/Exception/PostTemplatesEmailCreateNotFoundException.php
new file mode 100644
index 0000000..192c20b
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailCreateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailCreateTooManyRequestsException.php b/lib/Exception/PostTemplatesEmailCreateTooManyRequestsException.php
new file mode 100644
index 0000000..866fc0b
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailCreateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailCreateUnauthorizedException.php b/lib/Exception/PostTemplatesEmailCreateUnauthorizedException.php
new file mode 100644
index 0000000..e6b094e
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailCreateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailUpdateBadRequestException.php b/lib/Exception/PostTemplatesEmailUpdateBadRequestException.php
new file mode 100644
index 0000000..9d27f2d
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailUpdateForbiddenException.php b/lib/Exception/PostTemplatesEmailUpdateForbiddenException.php
new file mode 100644
index 0000000..09ac5b6
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailUpdateInternalServerErrorException.php b/lib/Exception/PostTemplatesEmailUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..83c0760
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailUpdateNotFoundException.php b/lib/Exception/PostTemplatesEmailUpdateNotFoundException.php
new file mode 100644
index 0000000..6a14deb
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailUpdateTooManyRequestsException.php b/lib/Exception/PostTemplatesEmailUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..d384317
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTemplatesEmailUpdateUnauthorizedException.php b/lib/Exception/PostTemplatesEmailUpdateUnauthorizedException.php
new file mode 100644
index 0000000..d74a5ac
--- /dev/null
+++ b/lib/Exception/PostTemplatesEmailUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendBadRequestException.php b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendBadRequestException.php
new file mode 100644
index 0000000..9340fa9
--- /dev/null
+++ b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendForbiddenException.php b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendForbiddenException.php
new file mode 100644
index 0000000..8e3adcd
--- /dev/null
+++ b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendInternalServerErrorException.php b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendInternalServerErrorException.php
new file mode 100644
index 0000000..fbadb01
--- /dev/null
+++ b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendNotFoundException.php b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendNotFoundException.php
new file mode 100644
index 0000000..369ddae
--- /dev/null
+++ b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendTooManyRequestsException.php b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendTooManyRequestsException.php
new file mode 100644
index 0000000..b57bf2b
--- /dev/null
+++ b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendUnauthorizedException.php b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendUnauthorizedException.php
new file mode 100644
index 0000000..d0a38c7
--- /dev/null
+++ b/lib/Exception/PostTransactionalV1CampaignsByCampaignIdSendUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasNewBadRequestException.php b/lib/Exception/PostUsersAliasNewBadRequestException.php
new file mode 100644
index 0000000..e63d302
--- /dev/null
+++ b/lib/Exception/PostUsersAliasNewBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasNewForbiddenException.php b/lib/Exception/PostUsersAliasNewForbiddenException.php
new file mode 100644
index 0000000..08a9b97
--- /dev/null
+++ b/lib/Exception/PostUsersAliasNewForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasNewInternalServerErrorException.php b/lib/Exception/PostUsersAliasNewInternalServerErrorException.php
new file mode 100644
index 0000000..41ca4f4
--- /dev/null
+++ b/lib/Exception/PostUsersAliasNewInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasNewNotFoundException.php b/lib/Exception/PostUsersAliasNewNotFoundException.php
new file mode 100644
index 0000000..7ecc572
--- /dev/null
+++ b/lib/Exception/PostUsersAliasNewNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasNewTooManyRequestsException.php b/lib/Exception/PostUsersAliasNewTooManyRequestsException.php
new file mode 100644
index 0000000..645de5e
--- /dev/null
+++ b/lib/Exception/PostUsersAliasNewTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasNewUnauthorizedException.php b/lib/Exception/PostUsersAliasNewUnauthorizedException.php
new file mode 100644
index 0000000..c685e76
--- /dev/null
+++ b/lib/Exception/PostUsersAliasNewUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasUpdateBadRequestException.php b/lib/Exception/PostUsersAliasUpdateBadRequestException.php
new file mode 100644
index 0000000..4c8dcbf
--- /dev/null
+++ b/lib/Exception/PostUsersAliasUpdateBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasUpdateForbiddenException.php b/lib/Exception/PostUsersAliasUpdateForbiddenException.php
new file mode 100644
index 0000000..39b6283
--- /dev/null
+++ b/lib/Exception/PostUsersAliasUpdateForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasUpdateInternalServerErrorException.php b/lib/Exception/PostUsersAliasUpdateInternalServerErrorException.php
new file mode 100644
index 0000000..09b83dc
--- /dev/null
+++ b/lib/Exception/PostUsersAliasUpdateInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasUpdateNotFoundException.php b/lib/Exception/PostUsersAliasUpdateNotFoundException.php
new file mode 100644
index 0000000..0ccbf6a
--- /dev/null
+++ b/lib/Exception/PostUsersAliasUpdateNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasUpdateTooManyRequestsException.php b/lib/Exception/PostUsersAliasUpdateTooManyRequestsException.php
new file mode 100644
index 0000000..5978367
--- /dev/null
+++ b/lib/Exception/PostUsersAliasUpdateTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersAliasUpdateUnauthorizedException.php b/lib/Exception/PostUsersAliasUpdateUnauthorizedException.php
new file mode 100644
index 0000000..3cb3ef0
--- /dev/null
+++ b/lib/Exception/PostUsersAliasUpdateUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersDeleteBadRequestException.php b/lib/Exception/PostUsersDeleteBadRequestException.php
new file mode 100644
index 0000000..1c8151f
--- /dev/null
+++ b/lib/Exception/PostUsersDeleteBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersDeleteForbiddenException.php b/lib/Exception/PostUsersDeleteForbiddenException.php
new file mode 100644
index 0000000..4ecae97
--- /dev/null
+++ b/lib/Exception/PostUsersDeleteForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersDeleteInternalServerErrorException.php b/lib/Exception/PostUsersDeleteInternalServerErrorException.php
new file mode 100644
index 0000000..7e334a9
--- /dev/null
+++ b/lib/Exception/PostUsersDeleteInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersDeleteNotFoundException.php b/lib/Exception/PostUsersDeleteNotFoundException.php
new file mode 100644
index 0000000..5fc37aa
--- /dev/null
+++ b/lib/Exception/PostUsersDeleteNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersDeleteTooManyRequestsException.php b/lib/Exception/PostUsersDeleteTooManyRequestsException.php
new file mode 100644
index 0000000..d0d0b16
--- /dev/null
+++ b/lib/Exception/PostUsersDeleteTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersDeleteUnauthorizedException.php b/lib/Exception/PostUsersDeleteUnauthorizedException.php
new file mode 100644
index 0000000..ba97872
--- /dev/null
+++ b/lib/Exception/PostUsersDeleteUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportGlobalControlGroupBadRequestException.php b/lib/Exception/PostUsersExportGlobalControlGroupBadRequestException.php
new file mode 100644
index 0000000..2ec9366
--- /dev/null
+++ b/lib/Exception/PostUsersExportGlobalControlGroupBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportGlobalControlGroupForbiddenException.php b/lib/Exception/PostUsersExportGlobalControlGroupForbiddenException.php
new file mode 100644
index 0000000..56f10ee
--- /dev/null
+++ b/lib/Exception/PostUsersExportGlobalControlGroupForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportGlobalControlGroupInternalServerErrorException.php b/lib/Exception/PostUsersExportGlobalControlGroupInternalServerErrorException.php
new file mode 100644
index 0000000..f155479
--- /dev/null
+++ b/lib/Exception/PostUsersExportGlobalControlGroupInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportGlobalControlGroupNotFoundException.php b/lib/Exception/PostUsersExportGlobalControlGroupNotFoundException.php
new file mode 100644
index 0000000..d6da301
--- /dev/null
+++ b/lib/Exception/PostUsersExportGlobalControlGroupNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportGlobalControlGroupTooManyRequestsException.php b/lib/Exception/PostUsersExportGlobalControlGroupTooManyRequestsException.php
new file mode 100644
index 0000000..b94eb75
--- /dev/null
+++ b/lib/Exception/PostUsersExportGlobalControlGroupTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportGlobalControlGroupUnauthorizedException.php b/lib/Exception/PostUsersExportGlobalControlGroupUnauthorizedException.php
new file mode 100644
index 0000000..28adb65
--- /dev/null
+++ b/lib/Exception/PostUsersExportGlobalControlGroupUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportIdBadRequestException.php b/lib/Exception/PostUsersExportIdBadRequestException.php
new file mode 100644
index 0000000..b2d606f
--- /dev/null
+++ b/lib/Exception/PostUsersExportIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportIdForbiddenException.php b/lib/Exception/PostUsersExportIdForbiddenException.php
new file mode 100644
index 0000000..1a7bbcb
--- /dev/null
+++ b/lib/Exception/PostUsersExportIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportIdInternalServerErrorException.php b/lib/Exception/PostUsersExportIdInternalServerErrorException.php
new file mode 100644
index 0000000..14bf325
--- /dev/null
+++ b/lib/Exception/PostUsersExportIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportIdNotFoundException.php b/lib/Exception/PostUsersExportIdNotFoundException.php
new file mode 100644
index 0000000..2d53e22
--- /dev/null
+++ b/lib/Exception/PostUsersExportIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportIdTooManyRequestsException.php b/lib/Exception/PostUsersExportIdTooManyRequestsException.php
new file mode 100644
index 0000000..12ffe15
--- /dev/null
+++ b/lib/Exception/PostUsersExportIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportIdUnauthorizedException.php b/lib/Exception/PostUsersExportIdUnauthorizedException.php
new file mode 100644
index 0000000..0a7dc03
--- /dev/null
+++ b/lib/Exception/PostUsersExportIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportSegmentBadRequestException.php b/lib/Exception/PostUsersExportSegmentBadRequestException.php
new file mode 100644
index 0000000..a2fab27
--- /dev/null
+++ b/lib/Exception/PostUsersExportSegmentBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportSegmentForbiddenException.php b/lib/Exception/PostUsersExportSegmentForbiddenException.php
new file mode 100644
index 0000000..7ed9244
--- /dev/null
+++ b/lib/Exception/PostUsersExportSegmentForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportSegmentInternalServerErrorException.php b/lib/Exception/PostUsersExportSegmentInternalServerErrorException.php
new file mode 100644
index 0000000..c5e93db
--- /dev/null
+++ b/lib/Exception/PostUsersExportSegmentInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportSegmentNotFoundException.php b/lib/Exception/PostUsersExportSegmentNotFoundException.php
new file mode 100644
index 0000000..4c18999
--- /dev/null
+++ b/lib/Exception/PostUsersExportSegmentNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportSegmentTooManyRequestsException.php b/lib/Exception/PostUsersExportSegmentTooManyRequestsException.php
new file mode 100644
index 0000000..e768f89
--- /dev/null
+++ b/lib/Exception/PostUsersExportSegmentTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExportSegmentUnauthorizedException.php b/lib/Exception/PostUsersExportSegmentUnauthorizedException.php
new file mode 100644
index 0000000..0db9cf1
--- /dev/null
+++ b/lib/Exception/PostUsersExportSegmentUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRemoveBadRequestException.php b/lib/Exception/PostUsersExternalIdsRemoveBadRequestException.php
new file mode 100644
index 0000000..213a3b2
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRemoveBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRemoveForbiddenException.php b/lib/Exception/PostUsersExternalIdsRemoveForbiddenException.php
new file mode 100644
index 0000000..76d9469
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRemoveForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRemoveInternalServerErrorException.php b/lib/Exception/PostUsersExternalIdsRemoveInternalServerErrorException.php
new file mode 100644
index 0000000..361c670
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRemoveInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRemoveNotFoundException.php b/lib/Exception/PostUsersExternalIdsRemoveNotFoundException.php
new file mode 100644
index 0000000..2bab549
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRemoveNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRemoveTooManyRequestsException.php b/lib/Exception/PostUsersExternalIdsRemoveTooManyRequestsException.php
new file mode 100644
index 0000000..fd864d1
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRemoveTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRemoveUnauthorizedException.php b/lib/Exception/PostUsersExternalIdsRemoveUnauthorizedException.php
new file mode 100644
index 0000000..3b2b89c
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRemoveUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRenameBadRequestException.php b/lib/Exception/PostUsersExternalIdsRenameBadRequestException.php
new file mode 100644
index 0000000..32db3d2
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRenameBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRenameForbiddenException.php b/lib/Exception/PostUsersExternalIdsRenameForbiddenException.php
new file mode 100644
index 0000000..9279b5c
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRenameForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRenameInternalServerErrorException.php b/lib/Exception/PostUsersExternalIdsRenameInternalServerErrorException.php
new file mode 100644
index 0000000..4cdfd17
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRenameInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRenameNotFoundException.php b/lib/Exception/PostUsersExternalIdsRenameNotFoundException.php
new file mode 100644
index 0000000..1119cdc
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRenameNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRenameTooManyRequestsException.php b/lib/Exception/PostUsersExternalIdsRenameTooManyRequestsException.php
new file mode 100644
index 0000000..2778167
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRenameTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersExternalIdsRenameUnauthorizedException.php b/lib/Exception/PostUsersExternalIdsRenameUnauthorizedException.php
new file mode 100644
index 0000000..a7547c5
--- /dev/null
+++ b/lib/Exception/PostUsersExternalIdsRenameUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersIdentifyBadRequestException.php b/lib/Exception/PostUsersIdentifyBadRequestException.php
new file mode 100644
index 0000000..9ee0bf8
--- /dev/null
+++ b/lib/Exception/PostUsersIdentifyBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersIdentifyForbiddenException.php b/lib/Exception/PostUsersIdentifyForbiddenException.php
new file mode 100644
index 0000000..caf5660
--- /dev/null
+++ b/lib/Exception/PostUsersIdentifyForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersIdentifyInternalServerErrorException.php b/lib/Exception/PostUsersIdentifyInternalServerErrorException.php
new file mode 100644
index 0000000..795d861
--- /dev/null
+++ b/lib/Exception/PostUsersIdentifyInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersIdentifyNotFoundException.php b/lib/Exception/PostUsersIdentifyNotFoundException.php
new file mode 100644
index 0000000..bb74a84
--- /dev/null
+++ b/lib/Exception/PostUsersIdentifyNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersIdentifyTooManyRequestsException.php b/lib/Exception/PostUsersIdentifyTooManyRequestsException.php
new file mode 100644
index 0000000..cbfa601
--- /dev/null
+++ b/lib/Exception/PostUsersIdentifyTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersIdentifyUnauthorizedException.php b/lib/Exception/PostUsersIdentifyUnauthorizedException.php
new file mode 100644
index 0000000..e868a99
--- /dev/null
+++ b/lib/Exception/PostUsersIdentifyUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersMergeBadRequestException.php b/lib/Exception/PostUsersMergeBadRequestException.php
new file mode 100644
index 0000000..be01633
--- /dev/null
+++ b/lib/Exception/PostUsersMergeBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersMergeForbiddenException.php b/lib/Exception/PostUsersMergeForbiddenException.php
new file mode 100644
index 0000000..d5fad5f
--- /dev/null
+++ b/lib/Exception/PostUsersMergeForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersMergeInternalServerErrorException.php b/lib/Exception/PostUsersMergeInternalServerErrorException.php
new file mode 100644
index 0000000..6dc3fc1
--- /dev/null
+++ b/lib/Exception/PostUsersMergeInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersMergeNotFoundException.php b/lib/Exception/PostUsersMergeNotFoundException.php
new file mode 100644
index 0000000..7bf29e0
--- /dev/null
+++ b/lib/Exception/PostUsersMergeNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersMergeTooManyRequestsException.php b/lib/Exception/PostUsersMergeTooManyRequestsException.php
new file mode 100644
index 0000000..a1634f2
--- /dev/null
+++ b/lib/Exception/PostUsersMergeTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersMergeUnauthorizedException.php b/lib/Exception/PostUsersMergeUnauthorizedException.php
new file mode 100644
index 0000000..d75acbf
--- /dev/null
+++ b/lib/Exception/PostUsersMergeUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersTrackBadRequestException.php b/lib/Exception/PostUsersTrackBadRequestException.php
new file mode 100644
index 0000000..af3e783
--- /dev/null
+++ b/lib/Exception/PostUsersTrackBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersTrackForbiddenException.php b/lib/Exception/PostUsersTrackForbiddenException.php
new file mode 100644
index 0000000..428b2f2
--- /dev/null
+++ b/lib/Exception/PostUsersTrackForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersTrackInternalServerErrorException.php b/lib/Exception/PostUsersTrackInternalServerErrorException.php
new file mode 100644
index 0000000..8a406d4
--- /dev/null
+++ b/lib/Exception/PostUsersTrackInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersTrackNotFoundException.php b/lib/Exception/PostUsersTrackNotFoundException.php
new file mode 100644
index 0000000..e2f726c
--- /dev/null
+++ b/lib/Exception/PostUsersTrackNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersTrackTooManyRequestsException.php b/lib/Exception/PostUsersTrackTooManyRequestsException.php
new file mode 100644
index 0000000..27863ac
--- /dev/null
+++ b/lib/Exception/PostUsersTrackTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostUsersTrackUnauthorizedException.php b/lib/Exception/PostUsersTrackUnauthorizedException.php
new file mode 100644
index 0000000..5abce44
--- /dev/null
+++ b/lib/Exception/PostUsersTrackUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostV2SubscriptionStatusSetBadRequestException.php b/lib/Exception/PostV2SubscriptionStatusSetBadRequestException.php
new file mode 100644
index 0000000..e993d5c
--- /dev/null
+++ b/lib/Exception/PostV2SubscriptionStatusSetBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostV2SubscriptionStatusSetForbiddenException.php b/lib/Exception/PostV2SubscriptionStatusSetForbiddenException.php
new file mode 100644
index 0000000..43a1e3f
--- /dev/null
+++ b/lib/Exception/PostV2SubscriptionStatusSetForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostV2SubscriptionStatusSetInternalServerErrorException.php b/lib/Exception/PostV2SubscriptionStatusSetInternalServerErrorException.php
new file mode 100644
index 0000000..dc81250
--- /dev/null
+++ b/lib/Exception/PostV2SubscriptionStatusSetInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostV2SubscriptionStatusSetNotFoundException.php b/lib/Exception/PostV2SubscriptionStatusSetNotFoundException.php
new file mode 100644
index 0000000..1633e03
--- /dev/null
+++ b/lib/Exception/PostV2SubscriptionStatusSetNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostV2SubscriptionStatusSetTooManyRequestsException.php b/lib/Exception/PostV2SubscriptionStatusSetTooManyRequestsException.php
new file mode 100644
index 0000000..b22d92d
--- /dev/null
+++ b/lib/Exception/PostV2SubscriptionStatusSetTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PostV2SubscriptionStatusSetUnauthorizedException.php b/lib/Exception/PostV2SubscriptionStatusSetUnauthorizedException.php
new file mode 100644
index 0000000..77d396c
--- /dev/null
+++ b/lib/Exception/PostV2SubscriptionStatusSetUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemBadRequestException.php b/lib/Exception/PutCatalogsByCatalogNameItemBadRequestException.php
new file mode 100644
index 0000000..ae45f88
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemByItemIdBadRequestException.php b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdBadRequestException.php
new file mode 100644
index 0000000..8946ba4
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemByItemIdForbiddenException.php b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdForbiddenException.php
new file mode 100644
index 0000000..17c2045
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
new file mode 100644
index 0000000..4aae0bf
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemByItemIdNotFoundException.php b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdNotFoundException.php
new file mode 100644
index 0000000..f4d07d0
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
new file mode 100644
index 0000000..0d82c57
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemByItemIdUnauthorizedException.php b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
new file mode 100644
index 0000000..f3563ce
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemByItemIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemForbiddenException.php b/lib/Exception/PutCatalogsByCatalogNameItemForbiddenException.php
new file mode 100644
index 0000000..8f46cb7
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemInternalServerErrorException.php b/lib/Exception/PutCatalogsByCatalogNameItemInternalServerErrorException.php
new file mode 100644
index 0000000..0d169fc
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemNotFoundException.php b/lib/Exception/PutCatalogsByCatalogNameItemNotFoundException.php
new file mode 100644
index 0000000..706c1c2
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemTooManyRequestsException.php b/lib/Exception/PutCatalogsByCatalogNameItemTooManyRequestsException.php
new file mode 100644
index 0000000..4b9d20c
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutCatalogsByCatalogNameItemUnauthorizedException.php b/lib/Exception/PutCatalogsByCatalogNameItemUnauthorizedException.php
new file mode 100644
index 0000000..ee027b8
--- /dev/null
+++ b/lib/Exception/PutCatalogsByCatalogNameItemUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException.php b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException.php
new file mode 100644
index 0000000..457e604
--- /dev/null
+++ b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException.php b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException.php
new file mode 100644
index 0000000..493d309
--- /dev/null
+++ b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException.php b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException.php
new file mode 100644
index 0000000..7ba89c8
--- /dev/null
+++ b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException.php b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException.php
new file mode 100644
index 0000000..d636a6e
--- /dev/null
+++ b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException.php b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException.php
new file mode 100644
index 0000000..75356f4
--- /dev/null
+++ b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException.php b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException.php
new file mode 100644
index 0000000..bd2023c
--- /dev/null
+++ b/lib/Exception/PutPreferenceCenterV1ByPreferenceCenterExternalIDUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutScimV2UserByIdBadRequestException.php b/lib/Exception/PutScimV2UserByIdBadRequestException.php
new file mode 100644
index 0000000..40b52ec
--- /dev/null
+++ b/lib/Exception/PutScimV2UserByIdBadRequestException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutScimV2UserByIdForbiddenException.php b/lib/Exception/PutScimV2UserByIdForbiddenException.php
new file mode 100644
index 0000000..31ea4e7
--- /dev/null
+++ b/lib/Exception/PutScimV2UserByIdForbiddenException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutScimV2UserByIdInternalServerErrorException.php b/lib/Exception/PutScimV2UserByIdInternalServerErrorException.php
new file mode 100644
index 0000000..6f5ebed
--- /dev/null
+++ b/lib/Exception/PutScimV2UserByIdInternalServerErrorException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutScimV2UserByIdNotFoundException.php b/lib/Exception/PutScimV2UserByIdNotFoundException.php
new file mode 100644
index 0000000..745d645
--- /dev/null
+++ b/lib/Exception/PutScimV2UserByIdNotFoundException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutScimV2UserByIdTooManyRequestsException.php b/lib/Exception/PutScimV2UserByIdTooManyRequestsException.php
new file mode 100644
index 0000000..da56c7f
--- /dev/null
+++ b/lib/Exception/PutScimV2UserByIdTooManyRequestsException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/PutScimV2UserByIdUnauthorizedException.php b/lib/Exception/PutScimV2UserByIdUnauthorizedException.php
new file mode 100644
index 0000000..27e9567
--- /dev/null
+++ b/lib/Exception/PutScimV2UserByIdUnauthorizedException.php
@@ -0,0 +1,40 @@
+error = $error;
+ $this->response = $response;
+ }
+
+ public function getError(): \Braze\Model\Error
+ {
+ return $this->error;
+ }
+
+ public function getResponse(): \Psr\Http\Message\ResponseInterface
+ {
+ return $this->response;
+ }
+}
diff --git a/lib/Exception/ServerException.php b/lib/Exception/ServerException.php
new file mode 100644
index 0000000..afe3d17
--- /dev/null
+++ b/lib/Exception/ServerException.php
@@ -0,0 +1,15 @@
+initialized);
+ }
+ /**
+ * @var string
+ */
+ protected $message;
+ /**
+ * @var string[]
+ */
+ protected $errors;
+
+ public function getMessage(): string
+ {
+ return $this->message;
+ }
+
+ public function setMessage(string $message): self
+ {
+ $this->initialized['message'] = true;
+ $this->message = $message;
+
+ return $this;
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getErrors(): array
+ {
+ return $this->errors;
+ }
+
+ /**
+ * @param string[] $errors
+ */
+ public function setErrors(array $errors): self
+ {
+ $this->initialized['errors'] = true;
+ $this->errors = $errors;
+
+ return $this;
+ }
+}
diff --git a/lib/Normalizer/ErrorNormalizer.php b/lib/Normalizer/ErrorNormalizer.php
new file mode 100644
index 0000000..87901d7
--- /dev/null
+++ b/lib/Normalizer/ErrorNormalizer.php
@@ -0,0 +1,102 @@
+setMessage($data['message']);
+ unset($data['message']);
+ }
+ if (\array_key_exists('errors', $data)) {
+ $values = [];
+ foreach ($data['errors'] as $value) {
+ $values[] = $value;
+ }
+ $object->setErrors($values);
+ unset($data['errors']);
+ }
+ foreach ($data as $key => $value_1) {
+ if (preg_match('/.*/', (string) $key)) {
+ $object[$key] = $value_1;
+ }
+ }
+
+ return $object;
+ }
+
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = [])
+ {
+ $data = [];
+ if ($object->isInitialized('message') && null !== $object->getMessage()) {
+ $data['message'] = $object->getMessage();
+ }
+ if ($object->isInitialized('errors') && null !== $object->getErrors()) {
+ $values = [];
+ foreach ($object->getErrors() as $value) {
+ $values[] = $value;
+ }
+ $data['errors'] = $values;
+ }
+ foreach ($object as $key => $value_1) {
+ if (preg_match('/.*/', (string) $key)) {
+ $data[$key] = $value_1;
+ }
+ }
+
+ return $data;
+ }
+
+ public function getSupportedTypes(string $format = null): array
+ {
+ return ['Braze\\Model\\Error' => false];
+ }
+}
diff --git a/lib/Normalizer/JaneObjectNormalizer.php b/lib/Normalizer/JaneObjectNormalizer.php
new file mode 100644
index 0000000..bb8519b
--- /dev/null
+++ b/lib/Normalizer/JaneObjectNormalizer.php
@@ -0,0 +1,79 @@
+ 'Braze\\Normalizer\\ErrorNormalizer', '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => '\\Braze\\Runtime\\Normalizer\\ReferenceNormalizer'];
+ protected $normalizersCache = [];
+
+ public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
+ {
+ return array_key_exists($type, $this->normalizers);
+ }
+
+ public function supportsNormalization($data, $format = null, array $context = []): bool
+ {
+ return is_object($data) && array_key_exists(get_class($data), $this->normalizers);
+ }
+
+ /**
+ * @return array|string|int|float|bool|\ArrayObject|null
+ */
+ public function normalize($object, $format = null, array $context = [])
+ {
+ $normalizerClass = $this->normalizers[get_class($object)];
+ $normalizer = $this->getNormalizer($normalizerClass);
+
+ return $normalizer->normalize($object, $format, $context);
+ }
+
+ public function denormalize($data, $class, $format = null, array $context = [])
+ {
+ $denormalizerClass = $this->normalizers[$class];
+ $denormalizer = $this->getNormalizer($denormalizerClass);
+
+ return $denormalizer->denormalize($data, $class, $format, $context);
+ }
+
+ private function getNormalizer(string $normalizerClass)
+ {
+ return $this->normalizersCache[$normalizerClass] ?? $this->initNormalizer($normalizerClass);
+ }
+
+ private function initNormalizer(string $normalizerClass)
+ {
+ $normalizer = new $normalizerClass();
+ $normalizer->setNormalizer($this->normalizer);
+ $normalizer->setDenormalizer($this->denormalizer);
+ $this->normalizersCache[$normalizerClass] = $normalizer;
+
+ return $normalizer;
+ }
+
+ public function getSupportedTypes(string $format = null): array
+ {
+ return ['Braze\\Model\\Error' => false, '\\Jane\\Component\\JsonSchemaRuntime\\Reference' => false];
+ }
+}
diff --git a/lib/Runtime/Client/BaseEndpoint.php b/lib/Runtime/Client/BaseEndpoint.php
new file mode 100644
index 0000000..23aee00
--- /dev/null
+++ b/lib/Runtime/Client/BaseEndpoint.php
@@ -0,0 +1,91 @@
+getQueryOptionsResolver()->resolve($this->queryParameters);
+ $optionsResolved = array_map(function ($value) {
+ return null !== $value ? $value : '';
+ }, $optionsResolved);
+
+ return http_build_query($optionsResolved, '', '&', PHP_QUERY_RFC3986);
+ }
+
+ public function getHeaders(array $baseHeaders = []): array
+ {
+ return array_merge($this->getExtraHeaders(), $baseHeaders, $this->getHeadersOptionsResolver()->resolve($this->headerParameters));
+ }
+
+ protected function getQueryOptionsResolver(): OptionsResolver
+ {
+ return new OptionsResolver();
+ }
+
+ protected function getHeadersOptionsResolver(): OptionsResolver
+ {
+ return new OptionsResolver();
+ }
+
+ // ----------------------------------------------------------------------------------------------------
+ // Used for OpenApi2 compatibility
+ protected function getFormBody(): array
+ {
+ return [['Content-Type' => ['application/x-www-form-urlencoded']], http_build_query($this->getFormOptionsResolver()->resolve($this->formParameters))];
+ }
+
+ protected function getMultipartBody($streamFactory = null): array
+ {
+ $bodyBuilder = new MultipartStreamBuilder($streamFactory);
+ $formParameters = $this->getFormOptionsResolver()->resolve($this->formParameters);
+ foreach ($formParameters as $key => $value) {
+ $bodyBuilder->addResource($key, $value);
+ }
+
+ return [['Content-Type' => ['multipart/form-data; boundary="' . ($bodyBuilder->getBoundary() . '"')]], $bodyBuilder->build()];
+ }
+
+ protected function getFormOptionsResolver(): OptionsResolver
+ {
+ return new OptionsResolver();
+ }
+
+ protected function getSerializedBody(SerializerInterface $serializer): array
+ {
+ return [['Content-Type' => ['application/json']], $serializer->serialize($this->body, 'json')];
+ }
+}
diff --git a/lib/Runtime/Client/Client.php b/lib/Runtime/Client/Client.php
new file mode 100644
index 0000000..319c9d5
--- /dev/null
+++ b/lib/Runtime/Client/Client.php
@@ -0,0 +1,98 @@
+httpClient = $httpClient;
+ $this->requestFactory = $requestFactory;
+ $this->serializer = $serializer;
+ $this->streamFactory = $streamFactory;
+ }
+
+ public function executeEndpoint(Endpoint $endpoint, string $fetch = self::FETCH_OBJECT)
+ {
+ if (self::FETCH_RESPONSE === $fetch) {
+ trigger_deprecation('jane-php/open-api-common', '7.3', 'Using %s::%s method with $fetch parameter equals to response is deprecated, use %s::%s instead.', __CLASS__, __METHOD__, __CLASS__, 'executeRawEndpoint');
+
+ return $this->executeRawEndpoint($endpoint);
+ }
+
+ return $endpoint->parseResponse($this->processEndpoint($endpoint), $this->serializer, $fetch);
+ }
+
+ public function executeRawEndpoint(Endpoint $endpoint): ResponseInterface
+ {
+ return $this->processEndpoint($endpoint);
+ }
+
+ private function processEndpoint(Endpoint $endpoint): ResponseInterface
+ {
+ [$bodyHeaders, $body] = $endpoint->getBody($this->serializer, $this->streamFactory);
+ $queryString = $endpoint->getQueryString();
+ $uriGlue = false === strpos($endpoint->getUri(), '?') ? '?' : '&';
+ $uri = $queryString !== '' ? $endpoint->getUri() . $uriGlue . $queryString : $endpoint->getUri();
+ $request = $this->requestFactory->createRequest($endpoint->getMethod(), $uri);
+ if ($body) {
+ if ($body instanceof StreamInterface) {
+ $request = $request->withBody($body);
+ } elseif (is_resource($body)) {
+ $request = $request->withBody($this->streamFactory->createStreamFromResource($body));
+ } elseif (strlen($body) <= 4000 && @file_exists($body)) {
+ // more than 4096 chars will trigger an error
+ $request = $request->withBody($this->streamFactory->createStreamFromFile($body));
+ } else {
+ $request = $request->withBody($this->streamFactory->createStream($body));
+ }
+ }
+ foreach ($endpoint->getHeaders($bodyHeaders) as $name => $value) {
+ $request = $request->withHeader($name, $value);
+ }
+ if (count($endpoint->getAuthenticationScopes()) > 0) {
+ $scopes = [];
+ foreach ($endpoint->getAuthenticationScopes() as $scope) {
+ $scopes[] = $scope;
+ }
+ $request = $request->withHeader(AuthenticationRegistry::SCOPES_HEADER, $scopes);
+ }
+
+ return $this->httpClient->sendRequest($request);
+ }
+}
diff --git a/lib/Runtime/Client/CustomQueryResolver.php b/lib/Runtime/Client/CustomQueryResolver.php
new file mode 100644
index 0000000..3f1667c
--- /dev/null
+++ b/lib/Runtime/Client/CustomQueryResolver.php
@@ -0,0 +1,18 @@
+hasHeader('Content-Type') ? current($response->getHeader('Content-Type')) : null;
+
+ return $this->transformResponseBody($response, $serializer, $contentType);
+ }
+}
diff --git a/lib/Runtime/Normalizer/CheckArray.php b/lib/Runtime/Normalizer/CheckArray.php
new file mode 100644
index 0000000..abab89c
--- /dev/null
+++ b/lib/Runtime/Normalizer/CheckArray.php
@@ -0,0 +1,21 @@
+getReferenceUri();
+
+ return $ref;
+ }
+
+ public function supportsNormalization($data, $format = null): bool
+ {
+ return $data instanceof Reference;
+ }
+}
diff --git a/lib/Runtime/Normalizer/ValidationException.php b/lib/Runtime/Normalizer/ValidationException.php
new file mode 100644
index 0000000..bd40c46
--- /dev/null
+++ b/lib/Runtime/Normalizer/ValidationException.php
@@ -0,0 +1,30 @@
+violationList = $violationList;
+ parent::__construct(sprintf('Model validation failed with %d errors.', $violationList->count()), 400);
+ }
+
+ public function getViolationList(): ConstraintViolationListInterface
+ {
+ return $this->violationList;
+ }
+}
diff --git a/lib/Runtime/Normalizer/ValidatorTrait.php b/lib/Runtime/Normalizer/ValidatorTrait.php
new file mode 100644
index 0000000..c7650bb
--- /dev/null
+++ b/lib/Runtime/Normalizer/ValidatorTrait.php
@@ -0,0 +1,25 @@
+validate($data, $constraint);
+ if ($violations->count() > 0) {
+ throw new ValidationException($violations);
+ }
+ }
+}
diff --git a/src/Braze.php b/src/Braze.php
new file mode 100644
index 0000000..0a673fc
--- /dev/null
+++ b/src/Braze.php
@@ -0,0 +1,37 @@
+createUri($apiUrl);
+ $bearer = new Bearer($apiKey);
+ $plugins = [
+ new AddHostPlugin($uri),
+ new AuthenticationPlugin($bearer),
+ ];
+ $httpClient = new PluginClient($httpClient, $plugins);
+ $this->client = Client::create($httpClient);
+ }
+}