Skip to content

Commit

Permalink
version 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
klaviyo-sdk committed Aug 15, 2023
1 parent 0c8cd02 commit bb85d0c
Show file tree
Hide file tree
Showing 291 changed files with 11,168 additions and 7,443 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

NOTE: For more granular API-specific changes, please see our [API Changelog](https://developers.klaviyo.com/en/docs/changelog_)


## [5.1.0] - revision 2023-08-15
### Added
- Flow Message Templates
- You can now retrieve the templates associated with flow messages using `Flows->getFlowMessageTemplate()` or `Flows->getFlowMessageRelationshipsTemplate()` . You’re also able to include the template HTML for a flow message using `Flows->getFlowMessage($id, $include=['template'])`.
- Create or Update Push Tokens
- We have added an endpoint to create or update push tokens, `Profiles->createPushToken()`. This endpoint can be used to migrate profiles and their push tokens from another platform to Klaviyo. If you’re looking to register push tokens from users’ devices, please use our mobile SDKs.

## [5.0.0] - revision 2023-07-15
### Added
Expand Down
396 changes: 220 additions & 176 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "klaviyo/api",
"version": "5.0.0",
"version": "5.1.0",
"description": "PHP SDK for Klaviyo's API.",
"keywords": [
"openapitools",
Expand Down
58 changes: 29 additions & 29 deletions lib/API/AccountsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
*
* The version of the OpenAPI document: 2023-07-15
* The version of the OpenAPI document: 2023-08-15
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.1.0
Expand Down Expand Up @@ -122,11 +122,11 @@ public function getConfig()
* Get Account
*
* @param string $id The ID of the account (required)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \KlaviyoAPI\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array<string,mixed>|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response
* @return array<string,mixed>|\KlaviyoAPI\Model\GetAccounts400Response|\KlaviyoAPI\Model\GetAccounts400Response
*/
public function getAccount($id, $fields_account = null, $apiKey = null)
{
Expand All @@ -140,11 +140,11 @@ public function getAccount($id, $fields_account = null, $apiKey = null)
* Get Account
*
* @param string $id The ID of the account (required)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \KlaviyoAPI\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of array<string,mixed>|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings)
* @return array of array<string,mixed>|\KlaviyoAPI\Model\GetAccounts400Response|\KlaviyoAPI\Model\GetAccounts400Response, HTTP status code, HTTP response headers (array of strings)
*/
public function getAccountWithHttpInfo($id, $fields_account = null, $apiKey = null)
{
Expand Down Expand Up @@ -208,11 +208,11 @@ public function getAccountWithHttpInfo($id, $fields_account = null, $apiKey = nu
$response->getHeaders()
];
case 400:
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' !== 'string') {
$content = json_decode($content);
}
}
Expand All @@ -229,11 +229,11 @@ public function getAccountWithHttpInfo($id, $fields_account = null, $apiKey = nu
$response->getHeaders()
];
case 500:
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' !== 'string') {
$content = json_decode($content);
}
}
Expand Down Expand Up @@ -285,15 +285,15 @@ public function getAccountWithHttpInfo($id, $fields_account = null, $apiKey = nu
case 400:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\KlaviyoAPI\Model\GetCreateVariantsJobs400Response',
'\KlaviyoAPI\Model\GetAccounts400Response',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 500:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\KlaviyoAPI\Model\GetCreateVariantsJobs400Response',
'\KlaviyoAPI\Model\GetAccounts400Response',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
Expand All @@ -309,7 +309,7 @@ public function getAccountWithHttpInfo($id, $fields_account = null, $apiKey = nu
* Get Account
*
* @param string $id The ID of the account (required)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
Expand All @@ -330,7 +330,7 @@ function ($response) {
* Get Account
*
* @param string $id The ID of the account (required)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
Expand Down Expand Up @@ -385,7 +385,7 @@ function ($exception) {
* Create request for operation 'getAccount'
*
* @param string $id The ID of the account (required)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
Expand Down Expand Up @@ -478,7 +478,7 @@ public function getAccountRequest($id, $fields_account = null, $apiKey = null)
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}

$defaultHeaders['revision'] = ['2023-07-15'];
$defaultHeaders['revision'] = ['2023-08-15'];

$headers = array_merge(
$defaultHeaders,
Expand All @@ -500,11 +500,11 @@ public function getAccountRequest($id, $fields_account = null, $apiKey = null)
*
* Get Accounts
*
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \KlaviyoAPI\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array<string,mixed>|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response
* @return array<string,mixed>|\KlaviyoAPI\Model\GetAccounts400Response|\KlaviyoAPI\Model\GetAccounts400Response
*/
public function getAccounts($fields_account = null, $apiKey = null)
{
Expand All @@ -517,11 +517,11 @@ public function getAccounts($fields_account = null, $apiKey = null)
*
* Get Accounts
*
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \KlaviyoAPI\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of array<string,mixed>|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings)
* @return array of array<string,mixed>|\KlaviyoAPI\Model\GetAccounts400Response|\KlaviyoAPI\Model\GetAccounts400Response, HTTP status code, HTTP response headers (array of strings)
*/
public function getAccountsWithHttpInfo($fields_account = null, $apiKey = null)
{
Expand Down Expand Up @@ -585,11 +585,11 @@ public function getAccountsWithHttpInfo($fields_account = null, $apiKey = null)
$response->getHeaders()
];
case 400:
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' !== 'string') {
$content = json_decode($content);
}
}
Expand All @@ -606,11 +606,11 @@ public function getAccountsWithHttpInfo($fields_account = null, $apiKey = null)
$response->getHeaders()
];
case 500:
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') {
if ('\KlaviyoAPI\Model\GetAccounts400Response' !== 'string') {
$content = json_decode($content);
}
}
Expand Down Expand Up @@ -662,15 +662,15 @@ public function getAccountsWithHttpInfo($fields_account = null, $apiKey = null)
case 400:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\KlaviyoAPI\Model\GetCreateVariantsJobs400Response',
'\KlaviyoAPI\Model\GetAccounts400Response',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 500:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\KlaviyoAPI\Model\GetCreateVariantsJobs400Response',
'\KlaviyoAPI\Model\GetAccounts400Response',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
Expand All @@ -685,7 +685,7 @@ public function getAccountsWithHttpInfo($fields_account = null, $apiKey = null)
*
* Get Accounts
*
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
Expand All @@ -705,7 +705,7 @@ function ($response) {
*
* Get Accounts
*
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
Expand Down Expand Up @@ -759,7 +759,7 @@ function ($exception) {
/**
* Create request for operation 'getAccounts'
*
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional)
* @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-08-15/reference/api-overview#sparse-fieldsets (optional)
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
Expand Down Expand Up @@ -838,7 +838,7 @@ public function getAccountsRequest($fields_account = null, $apiKey = null)
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}

$defaultHeaders['revision'] = ['2023-07-15'];
$defaultHeaders['revision'] = ['2023-08-15'];

$headers = array_merge(
$defaultHeaders,
Expand Down
Loading

0 comments on commit bb85d0c

Please sign in to comment.