diff --git a/CHANGELOG.md b/CHANGELOG.md index deb1ec7..4500973 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,34 @@ 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.0.0] - revision 2023-07-15 +### Added +- Back-In-stock APIs + - We have added support for subscribing profiles to back-in-stock notifications, for both email and SMS, using the new [createBackInStockSubscription](./README.md#create-back-in-stock-subscription) endpoint. +- New functionality to Campaigns API + - CRUD support for SMS campaigns is now available + - You can now also retrieve all messages for a campaign to determine performance data on campaigns where you're running A/B tests + - To support this functionality, we introduced a relationship between [campaigns and campaign messages](./README.md#get-campaign-relationships-campaign-messages), and between [campaign messages and templates](./README.md#get-campaign-message-relationships-template) + + +### Changed +- Relationship Standardization + - We are making a number of changes across endpoints to standardize how we handle [relationships](https://developers.klaviyo.com/en/docs/relationships_) in our APIs and leverage consistently typed objects across endpoints. For example, you can create a profile in our APIs in the same shape, regardless of whether you're calling the profiles endpoint or the events endpoint. + - The changes include: + - Updating 1:1 relationships to use singular tense and return an object (instead of plural and return an array) + - example: for [getFlowAction](./README.md#get-flow-action), if you want to use the `include` param, you would set `include=` to `"flow"` (instead of `"flows"`); the response will be an object (previously an array) + - Moving related object IDs from the attributes payload to relationships + - example: The format for the [body](https://developers.klaviyo.com/en/reference/create_tag) of [create_tag](./README.md#create-tag) has changed, with `tag_group_id` previously at `data.attributes.tag_group_id` being removed and replaced by a `data` object containing `type`+`id` and located at `data.relationships.tag-group.data`. + - Specifying a relationship between two Klaviyo objects to allow for improved consistency and greater interoperability across endpoints + - example: for [createEvent](./README.md#create-event), you can now create/update a profile for an event in the same way you would when using the profiles API directly + - NOTE: The examples for the above relationship changes are illustrative, not comprehensive. For a complete list of ALL the endpoints that have changed and exactly how, please refer to our latest [API Changelog](https://developers.klaviyo.com/en/docs/changelog_#revision-2023-07-15) +- For [getCampaigns](./README.md#get-campaigns) endpoint, `filter` param is now required, to, at minimum, filter on `messages.channel` + +### Removed +- We removed the `company_id` from the response for [getTemplate](./README.md#get-template) and [getTemplates](./README.md#get-templates). If you need to obtain the company ID / public API key for an account, please use the [Accounts API](./README.md#accounts). + ## [4.0.0] - revision 2023-06-15 ### Added - Accounts API is now available, this will allow you to access information about the Klaviyo account associated with your API key. @@ -71,4 +99,4 @@ NOTE: For more granular API-specific changes, please see our [API Changelog](htt - client name: `Client` → `KlaviyoAPI` - Client variable name in readme examples: `$client` → `$klaviyo` - Some functions have changed name -- Parameter ordering: The order of params has changed; you will need to update these for your existing implementation to work +- Parameter ordering: The order of params has changed; you will need to update these for your existing implementation to work \ No newline at end of file diff --git a/README.md b/README.md index d5fa1db..8c0cb4d 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Klaviyo PHP SDK -- SDK version: 4.0.0 -- API Revision: 2023-06-15 +- SDK version: 5.0.0 +- API Revision: 2023-07-15 ## Helpful Resources -- [API Reference](https://developers.klaviyo.com/en/v2023-06-15/reference) -- [API Guides](https://developers.klaviyo.com/en/v2023-06-15/docs) +- [API Reference](https://developers.klaviyo.com/en/v2023-07-15/reference) +- [API Guides](https://developers.klaviyo.com/en/v2023-07-15/docs) - [Postman Workspace](https://www.postman.com/klaviyo/workspace/klaviyo-developers) ## Design & Approach @@ -208,7 +208,7 @@ try { ## Important Notes - The main difference between this SDK and the language-agnostic API Docs that the below endpoints link to is that this SDK automatically adds the `revision` header corresponding to the SDK version. -- Organization: Resource groups and functions are listed in alphabetical order, first by Resource name, then by **OpenAPI Summary**. Operation summaries are those listed in the right side bar of the [API Reference](https://developers.klaviyo.com/en/v2023-06-15/reference/get_events). These summaries link directly to the corresponding section of the API reference. +- Organization: Resource groups and functions are listed in alphabetical order, first by Resource name, then by **OpenAPI Summary**. Operation summaries are those listed in the right side bar of the [API Reference](https://developers.klaviyo.com/en/v2023-07-15/reference/get_events). These summaries link directly to the corresponding section of the API reference. - For example values / data types, as well as whether parameters are required/optional, please reference the corresponding API Reference link. - Some keyword args are required for the API call to succeed, the API docs above are the source of truth regarding which keyword args are required. - JSON payloads should be passed in as associative arrays @@ -226,7 +226,7 @@ try { ## Accounts -#### [Get Account](https://developers.klaviyo.com/en/v2023-06-15/reference/get_account) +#### [Get Account](https://developers.klaviyo.com/en/v2023-07-15/reference/get_account) ```php ## Positional Arguments @@ -243,7 +243,7 @@ $klaviyo->Accounts->getAccount($id, $fields_account=$fields_account); -#### [Get Accounts](https://developers.klaviyo.com/en/v2023-06-15/reference/get_accounts) +#### [Get Accounts](https://developers.klaviyo.com/en/v2023-07-15/reference/get_accounts) ```php @@ -261,7 +261,7 @@ $klaviyo->Accounts->getAccounts($fields_account=$fields_account); ## Campaigns -#### [Create Campaign](https://developers.klaviyo.com/en/v2023-06-15/reference/create_campaign) +#### [Create Campaign](https://developers.klaviyo.com/en/v2023-07-15/reference/create_campaign) ```php ## Positional Arguments @@ -274,7 +274,7 @@ $klaviyo->Campaigns->createCampaign($body); -#### [Create Campaign Clone](https://developers.klaviyo.com/en/v2023-06-15/reference/create_campaign_clone) +#### [Create Campaign Clone](https://developers.klaviyo.com/en/v2023-07-15/reference/create_campaign_clone) ```php ## Positional Arguments @@ -287,7 +287,7 @@ $klaviyo->Campaigns->createCampaignClone($body); -#### [Assign Campaign Message Template](https://developers.klaviyo.com/en/v2023-06-15/reference/create_campaign_message_assign_template) +#### [Assign Campaign Message Template](https://developers.klaviyo.com/en/v2023-07-15/reference/create_campaign_message_assign_template) ```php ## Positional Arguments @@ -300,7 +300,7 @@ $klaviyo->Campaigns->createCampaignMessageAssignTemplate($body); -#### [Create Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2023-06-15/reference/create_campaign_recipient_estimation_job) +#### [Create Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2023-07-15/reference/create_campaign_recipient_estimation_job) ```php ## Positional Arguments @@ -313,7 +313,7 @@ $klaviyo->Campaigns->createCampaignRecipientEstimationJob($body); -#### [Create Campaign Send Job](https://developers.klaviyo.com/en/v2023-06-15/reference/create_campaign_send_job) +#### [Create Campaign Send Job](https://developers.klaviyo.com/en/v2023-07-15/reference/create_campaign_send_job) ```php ## Positional Arguments @@ -326,7 +326,7 @@ $klaviyo->Campaigns->createCampaignSendJob($body); -#### [Delete Campaign](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_campaign) +#### [Delete Campaign](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_campaign) ```php ## Positional Arguments @@ -339,7 +339,7 @@ $klaviyo->Campaigns->deleteCampaign($id); -#### [Get Campaign](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign) +#### [Get Campaign](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign) ```php ## Positional Arguments @@ -348,17 +348,101 @@ $klaviyo->Campaigns->deleteCampaign($id); ## Keyword Arguments +# $fields_campaign_message | string[] # $fields_campaign | string[] # $fields_tag | string[] # $include | string[] -$klaviyo->Campaigns->getCampaign($id, $fields_campaign=$fields_campaign, $fields_tag=$fields_tag, $include=$include); +$klaviyo->Campaigns->getCampaign($id, $fields_campaign_message=$fields_campaign_message, $fields_campaign=$fields_campaign, $fields_tag=$fields_tag, $include=$include); +``` + + + + +#### [Get Campaign Campaign Messages](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_campaign_messages) + +```php +## Positional Arguments + +# $id | string + +## Keyword Arguments + +# $fields_campaign_message | string[] +# $fields_campaign | string[] +# $fields_template | string[] +# $include | string[] + +$klaviyo->Campaigns->getCampaignCampaignMessages($id, $fields_campaign_message=$fields_campaign_message, $fields_campaign=$fields_campaign, $fields_template=$fields_template, $include=$include); +``` + + + + +#### [Get Campaign Message](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_message) + +```php +## Positional Arguments + +# $id | string + +## Keyword Arguments + +# $fields_campaign_message | string[] +# $fields_campaign | string[] +# $fields_template | string[] +# $include | string[] + +$klaviyo->Campaigns->getCampaignMessage($id, $fields_campaign_message=$fields_campaign_message, $fields_campaign=$fields_campaign, $fields_template=$fields_template, $include=$include); +``` + + + + +#### [Get Campaign Message Campaign](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_message_campaign) + +```php +## Positional Arguments + +# $id | string + +## Keyword Arguments + +# $fields_campaign_message | string[] + +$klaviyo->Campaigns->getCampaignMessageCampaign($id, $fields_campaign_message=$fields_campaign_message); +``` + + + + +#### [Get Campaign Message Relationships Campaign](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_message_relationships_campaign) + +```php +## Positional Arguments + +# $id | string + +$klaviyo->Campaigns->getCampaignMessageRelationshipsCampaign($id); ``` -#### [Get Campaign Message](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign_message) +#### [Get Campaign Message Relationships Template](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_message_relationships_template) + +```php +## Positional Arguments + +# $id | string + +$klaviyo->Campaigns->getCampaignMessageRelationshipsTemplate($id); +``` + + + + +#### [Get Campaign Message Template](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_message_template) ```php ## Positional Arguments @@ -369,13 +453,13 @@ $klaviyo->Campaigns->getCampaign($id, $fields_campaign=$fields_campaign, $fields # $fields_campaign_message | string[] -$klaviyo->Campaigns->getCampaignMessage($id, $fields_campaign_message=$fields_campaign_message); +$klaviyo->Campaigns->getCampaignMessageTemplate($id, $fields_campaign_message=$fields_campaign_message); ``` -#### [Get Campaign Recipient Estimation](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign_recipient_estimation) +#### [Get Campaign Recipient Estimation](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_recipient_estimation) ```php ## Positional Arguments @@ -392,7 +476,7 @@ $klaviyo->Campaigns->getCampaignRecipientEstimation($id, $fields_campaign_recipi -#### [Get Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign_recipient_estimation_job) +#### [Get Campaign Recipient Estimation Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_recipient_estimation_job) ```php ## Positional Arguments @@ -409,7 +493,20 @@ $klaviyo->Campaigns->getCampaignRecipientEstimationJob($id, $fields_campaign_rec -#### [Get Campaign Relationships Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign_relationships_tags) +#### [Get Campaign Relationships Campaign Messages](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_relationships_campaign_messages) + +```php +## Positional Arguments + +# $id | string + +$klaviyo->Campaigns->getCampaignRelationshipsCampaignMessages($id); +``` + + + + +#### [Get Campaign Relationships Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_relationships_tags) ```php ## Positional Arguments @@ -422,7 +519,7 @@ $klaviyo->Campaigns->getCampaignRelationshipsTags($id); -#### [Get Campaign Send Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign_send_job) +#### [Get Campaign Send Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_send_job) ```php ## Positional Arguments @@ -439,7 +536,7 @@ $klaviyo->Campaigns->getCampaignSendJob($id, $fields_campaign_send_job=$fields_c -#### [Get Campaign Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaign_tags) +#### [Get Campaign Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaign_tags) ```php ## Positional Arguments @@ -456,26 +553,29 @@ $klaviyo->Campaigns->getCampaignTags($id, $fields_tag=$fields_tag); -#### [Get Campaigns](https://developers.klaviyo.com/en/v2023-06-15/reference/get_campaigns) +#### [Get Campaigns](https://developers.klaviyo.com/en/v2023-07-15/reference/get_campaigns) ```php +## Positional Arguments + +# $filter | string ## Keyword Arguments +# $fields_campaign_message | string[] # $fields_campaign | string[] # $fields_tag | string[] -# $filter | string # $include | string[] # $page_cursor | string # $sort | string -$klaviyo->Campaigns->getCampaigns($fields_campaign=$fields_campaign, $fields_tag=$fields_tag, $filter=$filter, $include=$include, $page_cursor=$page_cursor, $sort=$sort); +$klaviyo->Campaigns->getCampaigns($filter, $fields_campaign_message=$fields_campaign_message, $fields_campaign=$fields_campaign, $fields_tag=$fields_tag, $include=$include, $page_cursor=$page_cursor, $sort=$sort); ``` -#### [Update Campaign](https://developers.klaviyo.com/en/v2023-06-15/reference/update_campaign) +#### [Update Campaign](https://developers.klaviyo.com/en/v2023-07-15/reference/update_campaign) ```php ## Positional Arguments @@ -489,7 +589,7 @@ $klaviyo->Campaigns->updateCampaign($id, $body); -#### [Update Campaign Message](https://developers.klaviyo.com/en/v2023-06-15/reference/update_campaign_message) +#### [Update Campaign Message](https://developers.klaviyo.com/en/v2023-07-15/reference/update_campaign_message) ```php ## Positional Arguments @@ -503,7 +603,7 @@ $klaviyo->Campaigns->updateCampaignMessage($id, $body); -#### [Update Campaign Send Job](https://developers.klaviyo.com/en/v2023-06-15/reference/update_campaign_send_job) +#### [Update Campaign Send Job](https://developers.klaviyo.com/en/v2023-07-15/reference/update_campaign_send_job) ```php ## Positional Arguments @@ -521,7 +621,20 @@ $klaviyo->Campaigns->updateCampaignSendJob($id, $body); ## Catalogs -#### [Create Catalog Category](https://developers.klaviyo.com/en/v2023-06-15/reference/create_catalog_category) +#### [Create Back In Stock Subscription](https://developers.klaviyo.com/en/v2023-07-15/reference/create_back_in_stock_subscription) + +```php +## Positional Arguments + +# $body | associative array + +$klaviyo->Catalogs->createBackInStockSubscription($body); +``` + + + + +#### [Create Catalog Category](https://developers.klaviyo.com/en/v2023-07-15/reference/create_catalog_category) ```php ## Positional Arguments @@ -534,7 +647,7 @@ $klaviyo->Catalogs->createCatalogCategory($body); -#### [Create Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-06-15/reference/create_catalog_category_relationships_items) +#### [Create Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-07-15/reference/create_catalog_category_relationships_items) ```php ## Positional Arguments @@ -548,7 +661,7 @@ $klaviyo->Catalogs->createCatalogCategoryRelationshipsItems($id, $body); -#### [Create Catalog Item](https://developers.klaviyo.com/en/v2023-06-15/reference/create_catalog_item) +#### [Create Catalog Item](https://developers.klaviyo.com/en/v2023-07-15/reference/create_catalog_item) ```php ## Positional Arguments @@ -561,7 +674,7 @@ $klaviyo->Catalogs->createCatalogItem($body); -#### [Create Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-06-15/reference/create_catalog_item_relationships_categories) +#### [Create Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-07-15/reference/create_catalog_item_relationships_categories) ```php ## Positional Arguments @@ -575,7 +688,7 @@ $klaviyo->Catalogs->createCatalogItemRelationshipsCategories($id, $body); -#### [Create Catalog Variant](https://developers.klaviyo.com/en/v2023-06-15/reference/create_catalog_variant) +#### [Create Catalog Variant](https://developers.klaviyo.com/en/v2023-07-15/reference/create_catalog_variant) ```php ## Positional Arguments @@ -588,7 +701,7 @@ $klaviyo->Catalogs->createCatalogVariant($body); -#### [Delete Catalog Category](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_catalog_category) +#### [Delete Catalog Category](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_catalog_category) ```php ## Positional Arguments @@ -601,7 +714,7 @@ $klaviyo->Catalogs->deleteCatalogCategory($id); -#### [Delete Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_catalog_category_relationships_items) +#### [Delete Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_catalog_category_relationships_items) ```php ## Positional Arguments @@ -615,7 +728,7 @@ $klaviyo->Catalogs->deleteCatalogCategoryRelationshipsItems($id, $body); -#### [Delete Catalog Item](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_catalog_item) +#### [Delete Catalog Item](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_catalog_item) ```php ## Positional Arguments @@ -628,7 +741,7 @@ $klaviyo->Catalogs->deleteCatalogItem($id); -#### [Delete Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_catalog_item_relationships_categories) +#### [Delete Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_catalog_item_relationships_categories) ```php ## Positional Arguments @@ -642,7 +755,7 @@ $klaviyo->Catalogs->deleteCatalogItemRelationshipsCategories($id, $body); -#### [Delete Catalog Variant](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_catalog_variant) +#### [Delete Catalog Variant](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_catalog_variant) ```php ## Positional Arguments @@ -655,7 +768,7 @@ $klaviyo->Catalogs->deleteCatalogVariant($id); -#### [Get Catalog Categories](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_categories) +#### [Get Catalog Categories](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_categories) ```php @@ -672,7 +785,7 @@ $klaviyo->Catalogs->getCatalogCategories($fields_catalog_category=$fields_catalo -#### [Get Catalog Category](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_category) +#### [Get Catalog Category](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_category) ```php ## Positional Arguments @@ -689,7 +802,7 @@ $klaviyo->Catalogs->getCatalogCategory($id, $fields_catalog_category=$fields_cat -#### [Get Catalog Category Items](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_category_items) +#### [Get Catalog Category Items](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_category_items) ```php ## Positional Arguments @@ -711,7 +824,7 @@ $klaviyo->Catalogs->getCatalogCategoryItems($id, $fields_catalog_item=$fields_ca -#### [Get Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_category_relationships_items) +#### [Get Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_category_relationships_items) ```php ## Positional Arguments @@ -728,7 +841,7 @@ $klaviyo->Catalogs->getCatalogCategoryRelationshipsItems($id, $page_cursor=$page -#### [Get Catalog Item](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_item) +#### [Get Catalog Item](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_item) ```php ## Positional Arguments @@ -747,7 +860,7 @@ $klaviyo->Catalogs->getCatalogItem($id, $fields_catalog_item=$fields_catalog_ite -#### [Get Catalog Item Categories](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_item_categories) +#### [Get Catalog Item Categories](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_item_categories) ```php ## Positional Arguments @@ -767,7 +880,7 @@ $klaviyo->Catalogs->getCatalogItemCategories($id, $fields_catalog_category=$fiel -#### [Get Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_item_relationships_categories) +#### [Get Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_item_relationships_categories) ```php ## Positional Arguments @@ -784,7 +897,7 @@ $klaviyo->Catalogs->getCatalogItemRelationshipsCategories($id, $page_cursor=$pag -#### [Get Catalog Item Variants](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_item_variants) +#### [Get Catalog Item Variants](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_item_variants) ```php ## Positional Arguments @@ -804,7 +917,7 @@ $klaviyo->Catalogs->getCatalogItemVariants($id, $fields_catalog_variant=$fields_ -#### [Get Catalog Items](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_items) +#### [Get Catalog Items](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_items) ```php @@ -823,7 +936,7 @@ $klaviyo->Catalogs->getCatalogItems($fields_catalog_item=$fields_catalog_item, $ -#### [Get Catalog Variant](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_variant) +#### [Get Catalog Variant](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_variant) ```php ## Positional Arguments @@ -840,7 +953,7 @@ $klaviyo->Catalogs->getCatalogVariant($id, $fields_catalog_variant=$fields_catal -#### [Get Catalog Variants](https://developers.klaviyo.com/en/v2023-06-15/reference/get_catalog_variants) +#### [Get Catalog Variants](https://developers.klaviyo.com/en/v2023-07-15/reference/get_catalog_variants) ```php @@ -857,7 +970,7 @@ $klaviyo->Catalogs->getCatalogVariants($fields_catalog_variant=$fields_catalog_v -#### [Get Create Categories Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_create_categories_job) +#### [Get Create Categories Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_create_categories_job) ```php ## Positional Arguments @@ -876,7 +989,7 @@ $klaviyo->Catalogs->getCreateCategoriesJob($job_id, $fields_catalog_category_bul -#### [Get Create Categories Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_create_categories_jobs) +#### [Get Create Categories Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_create_categories_jobs) ```php @@ -892,7 +1005,7 @@ $klaviyo->Catalogs->getCreateCategoriesJobs($fields_catalog_category_bulk_create -#### [Get Create Items Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_create_items_job) +#### [Get Create Items Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_create_items_job) ```php ## Positional Arguments @@ -911,7 +1024,7 @@ $klaviyo->Catalogs->getCreateItemsJob($job_id, $fields_catalog_item_bulk_create_ -#### [Get Create Items Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_create_items_jobs) +#### [Get Create Items Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_create_items_jobs) ```php @@ -927,7 +1040,7 @@ $klaviyo->Catalogs->getCreateItemsJobs($fields_catalog_item_bulk_create_job=$fie -#### [Get Create Variants Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_create_variants_job) +#### [Get Create Variants Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_create_variants_job) ```php ## Positional Arguments @@ -946,7 +1059,7 @@ $klaviyo->Catalogs->getCreateVariantsJob($job_id, $fields_catalog_variant_bulk_c -#### [Get Create Variants Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_create_variants_jobs) +#### [Get Create Variants Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_create_variants_jobs) ```php @@ -962,7 +1075,7 @@ $klaviyo->Catalogs->getCreateVariantsJobs($fields_catalog_variant_bulk_create_jo -#### [Get Delete Categories Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_delete_categories_job) +#### [Get Delete Categories Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_delete_categories_job) ```php ## Positional Arguments @@ -979,7 +1092,7 @@ $klaviyo->Catalogs->getDeleteCategoriesJob($job_id, $fields_catalog_category_bul -#### [Get Delete Categories Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_delete_categories_jobs) +#### [Get Delete Categories Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_delete_categories_jobs) ```php @@ -995,7 +1108,7 @@ $klaviyo->Catalogs->getDeleteCategoriesJobs($fields_catalog_category_bulk_delete -#### [Get Delete Items Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_delete_items_job) +#### [Get Delete Items Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_delete_items_job) ```php ## Positional Arguments @@ -1012,7 +1125,7 @@ $klaviyo->Catalogs->getDeleteItemsJob($job_id, $fields_catalog_item_bulk_delete_ -#### [Get Delete Items Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_delete_items_jobs) +#### [Get Delete Items Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_delete_items_jobs) ```php @@ -1028,7 +1141,7 @@ $klaviyo->Catalogs->getDeleteItemsJobs($fields_catalog_item_bulk_delete_job=$fie -#### [Get Delete Variants Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_delete_variants_job) +#### [Get Delete Variants Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_delete_variants_job) ```php ## Positional Arguments @@ -1045,7 +1158,7 @@ $klaviyo->Catalogs->getDeleteVariantsJob($job_id, $fields_catalog_variant_bulk_d -#### [Get Delete Variants Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_delete_variants_jobs) +#### [Get Delete Variants Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_delete_variants_jobs) ```php @@ -1061,7 +1174,7 @@ $klaviyo->Catalogs->getDeleteVariantsJobs($fields_catalog_variant_bulk_delete_jo -#### [Get Update Categories Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_update_categories_job) +#### [Get Update Categories Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_update_categories_job) ```php ## Positional Arguments @@ -1080,7 +1193,7 @@ $klaviyo->Catalogs->getUpdateCategoriesJob($job_id, $fields_catalog_category_bul -#### [Get Update Categories Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_update_categories_jobs) +#### [Get Update Categories Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_update_categories_jobs) ```php @@ -1096,7 +1209,7 @@ $klaviyo->Catalogs->getUpdateCategoriesJobs($fields_catalog_category_bulk_update -#### [Get Update Items Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_update_items_job) +#### [Get Update Items Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_update_items_job) ```php ## Positional Arguments @@ -1115,7 +1228,7 @@ $klaviyo->Catalogs->getUpdateItemsJob($job_id, $fields_catalog_item_bulk_update_ -#### [Get Update Items Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_update_items_jobs) +#### [Get Update Items Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_update_items_jobs) ```php @@ -1131,7 +1244,7 @@ $klaviyo->Catalogs->getUpdateItemsJobs($fields_catalog_item_bulk_update_job=$fie -#### [Get Update Variants Job](https://developers.klaviyo.com/en/v2023-06-15/reference/get_update_variants_job) +#### [Get Update Variants Job](https://developers.klaviyo.com/en/v2023-07-15/reference/get_update_variants_job) ```php ## Positional Arguments @@ -1150,7 +1263,7 @@ $klaviyo->Catalogs->getUpdateVariantsJob($job_id, $fields_catalog_variant_bulk_u -#### [Get Update Variants Jobs](https://developers.klaviyo.com/en/v2023-06-15/reference/get_update_variants_jobs) +#### [Get Update Variants Jobs](https://developers.klaviyo.com/en/v2023-07-15/reference/get_update_variants_jobs) ```php @@ -1166,7 +1279,7 @@ $klaviyo->Catalogs->getUpdateVariantsJobs($fields_catalog_variant_bulk_update_jo -#### [Spawn Create Categories Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_create_categories_job) +#### [Spawn Create Categories Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_create_categories_job) ```php ## Positional Arguments @@ -1179,7 +1292,7 @@ $klaviyo->Catalogs->spawnCreateCategoriesJob($body); -#### [Spawn Create Items Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_create_items_job) +#### [Spawn Create Items Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_create_items_job) ```php ## Positional Arguments @@ -1192,7 +1305,7 @@ $klaviyo->Catalogs->spawnCreateItemsJob($body); -#### [Spawn Create Variants Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_create_variants_job) +#### [Spawn Create Variants Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_create_variants_job) ```php ## Positional Arguments @@ -1205,7 +1318,7 @@ $klaviyo->Catalogs->spawnCreateVariantsJob($body); -#### [Spawn Delete Categories Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_delete_categories_job) +#### [Spawn Delete Categories Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_delete_categories_job) ```php ## Positional Arguments @@ -1218,7 +1331,7 @@ $klaviyo->Catalogs->spawnDeleteCategoriesJob($body); -#### [Spawn Delete Items Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_delete_items_job) +#### [Spawn Delete Items Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_delete_items_job) ```php ## Positional Arguments @@ -1231,7 +1344,7 @@ $klaviyo->Catalogs->spawnDeleteItemsJob($body); -#### [Spawn Delete Variants Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_delete_variants_job) +#### [Spawn Delete Variants Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_delete_variants_job) ```php ## Positional Arguments @@ -1244,7 +1357,7 @@ $klaviyo->Catalogs->spawnDeleteVariantsJob($body); -#### [Spawn Update Categories Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_update_categories_job) +#### [Spawn Update Categories Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_update_categories_job) ```php ## Positional Arguments @@ -1257,7 +1370,7 @@ $klaviyo->Catalogs->spawnUpdateCategoriesJob($body); -#### [Spawn Update Items Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_update_items_job) +#### [Spawn Update Items Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_update_items_job) ```php ## Positional Arguments @@ -1270,7 +1383,7 @@ $klaviyo->Catalogs->spawnUpdateItemsJob($body); -#### [Spawn Update Variants Job](https://developers.klaviyo.com/en/v2023-06-15/reference/spawn_update_variants_job) +#### [Spawn Update Variants Job](https://developers.klaviyo.com/en/v2023-07-15/reference/spawn_update_variants_job) ```php ## Positional Arguments @@ -1283,7 +1396,7 @@ $klaviyo->Catalogs->spawnUpdateVariantsJob($body); -#### [Update Catalog Category](https://developers.klaviyo.com/en/v2023-06-15/reference/update_catalog_category) +#### [Update Catalog Category](https://developers.klaviyo.com/en/v2023-07-15/reference/update_catalog_category) ```php ## Positional Arguments @@ -1297,7 +1410,7 @@ $klaviyo->Catalogs->updateCatalogCategory($id, $body); -#### [Update Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-06-15/reference/update_catalog_category_relationships_items) +#### [Update Catalog Category Relationships Items](https://developers.klaviyo.com/en/v2023-07-15/reference/update_catalog_category_relationships_items) ```php ## Positional Arguments @@ -1311,7 +1424,7 @@ $klaviyo->Catalogs->updateCatalogCategoryRelationshipsItems($id, $body); -#### [Update Catalog Item](https://developers.klaviyo.com/en/v2023-06-15/reference/update_catalog_item) +#### [Update Catalog Item](https://developers.klaviyo.com/en/v2023-07-15/reference/update_catalog_item) ```php ## Positional Arguments @@ -1325,7 +1438,7 @@ $klaviyo->Catalogs->updateCatalogItem($id, $body); -#### [Update Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-06-15/reference/update_catalog_item_relationships_categories) +#### [Update Catalog Item Relationships Categories](https://developers.klaviyo.com/en/v2023-07-15/reference/update_catalog_item_relationships_categories) ```php ## Positional Arguments @@ -1339,7 +1452,7 @@ $klaviyo->Catalogs->updateCatalogItemRelationshipsCategories($id, $body); -#### [Update Catalog Variant](https://developers.klaviyo.com/en/v2023-06-15/reference/update_catalog_variant) +#### [Update Catalog Variant](https://developers.klaviyo.com/en/v2023-07-15/reference/update_catalog_variant) ```php ## Positional Arguments @@ -1357,7 +1470,7 @@ $klaviyo->Catalogs->updateCatalogVariant($id, $body); ## DataPrivacy -#### [Request Profile Deletion](https://developers.klaviyo.com/en/v2023-06-15/reference/request_profile_deletion) +#### [Request Profile Deletion](https://developers.klaviyo.com/en/v2023-07-15/reference/request_profile_deletion) ```php ## Positional Arguments @@ -1374,7 +1487,7 @@ $klaviyo->DataPrivacy->requestProfileDeletion($body); ## Events -#### [Create Event](https://developers.klaviyo.com/en/v2023-06-15/reference/create_event) +#### [Create Event](https://developers.klaviyo.com/en/v2023-07-15/reference/create_event) ```php ## Positional Arguments @@ -1387,7 +1500,7 @@ $klaviyo->Events->createEvent($body); -#### [Get Event](https://developers.klaviyo.com/en/v2023-06-15/reference/get_event) +#### [Get Event](https://developers.klaviyo.com/en/v2023-07-15/reference/get_event) ```php ## Positional Arguments @@ -1407,7 +1520,7 @@ $klaviyo->Events->getEvent($id, $fields_event=$fields_event, $fields_metric=$fie -#### [Get Event Metrics](https://developers.klaviyo.com/en/v2023-06-15/reference/get_event_metrics) +#### [Get Event Metric](https://developers.klaviyo.com/en/v2023-07-15/reference/get_event_metric) ```php ## Positional Arguments @@ -1418,13 +1531,13 @@ $klaviyo->Events->getEvent($id, $fields_event=$fields_event, $fields_metric=$fie # $fields_metric | string[] -$klaviyo->Events->getEventMetrics($id, $fields_metric=$fields_metric); +$klaviyo->Events->getEventMetric($id, $fields_metric=$fields_metric); ``` -#### [Get Event Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_event_profiles) +#### [Get Event Profile](https://developers.klaviyo.com/en/v2023-07-15/reference/get_event_profile) ```php ## Positional Arguments @@ -1436,39 +1549,39 @@ $klaviyo->Events->getEventMetrics($id, $fields_metric=$fields_metric); # $additional_fields_profile | string[] # $fields_profile | string[] -$klaviyo->Events->getEventProfiles($id, $additional_fields_profile=$additional_fields_profile, $fields_profile=$fields_profile); +$klaviyo->Events->getEventProfile($id, $additional_fields_profile=$additional_fields_profile, $fields_profile=$fields_profile); ``` -#### [Get Event Relationships Metrics](https://developers.klaviyo.com/en/v2023-06-15/reference/get_event_relationships_metrics) +#### [Get Event Relationships Metric](https://developers.klaviyo.com/en/v2023-07-15/reference/get_event_relationships_metric) ```php ## Positional Arguments # $id | string -$klaviyo->Events->getEventRelationshipsMetrics($id); +$klaviyo->Events->getEventRelationshipsMetric($id); ``` -#### [Get Event Relationships Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_event_relationships_profiles) +#### [Get Event Relationships Profile](https://developers.klaviyo.com/en/v2023-07-15/reference/get_event_relationships_profile) ```php ## Positional Arguments # $id | string -$klaviyo->Events->getEventRelationshipsProfiles($id); +$klaviyo->Events->getEventRelationshipsProfile($id); ``` -#### [Get Events](https://developers.klaviyo.com/en/v2023-06-15/reference/get_events) +#### [Get Events](https://developers.klaviyo.com/en/v2023-07-15/reference/get_events) ```php @@ -1492,7 +1605,7 @@ $klaviyo->Events->getEvents($fields_event=$fields_event, $fields_metric=$fields_ ## Flows -#### [Get Flow](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow) +#### [Get Flow](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow) ```php ## Positional Arguments @@ -1503,15 +1616,16 @@ $klaviyo->Events->getEvents($fields_event=$fields_event, $fields_metric=$fields_ # $fields_flow_action | string[] # $fields_flow | string[] +# $fields_tag | string[] # $include | string[] -$klaviyo->Flows->getFlow($id, $fields_flow_action=$fields_flow_action, $fields_flow=$fields_flow, $include=$include); +$klaviyo->Flows->getFlow($id, $fields_flow_action=$fields_flow_action, $fields_flow=$fields_flow, $fields_tag=$fields_tag, $include=$include); ``` -#### [Get Flow Action](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_action) +#### [Get Flow Action](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_action) ```php ## Positional Arguments @@ -1531,7 +1645,7 @@ $klaviyo->Flows->getFlowAction($id, $fields_flow_action=$fields_flow_action, $fi -#### [Get Flow For Flow Action](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_action_flow) +#### [Get Flow For Flow Action](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_action_flow) ```php ## Positional Arguments @@ -1548,7 +1662,7 @@ $klaviyo->Flows->getFlowActionFlow($id, $fields_flow=$fields_flow); -#### [Get Messages For Flow Action](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_action_messages) +#### [Get Flow Action Messages](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_action_messages) ```php ## Positional Arguments @@ -1559,17 +1673,16 @@ $klaviyo->Flows->getFlowActionFlow($id, $fields_flow=$fields_flow); # $fields_flow_message | string[] # $filter | string -# $page_cursor | string # $page_size | int # $sort | string -$klaviyo->Flows->getFlowActionMessages($id, $fields_flow_message=$fields_flow_message, $filter=$filter, $page_cursor=$page_cursor, $page_size=$page_size, $sort=$sort); +$klaviyo->Flows->getFlowActionMessages($id, $fields_flow_message=$fields_flow_message, $filter=$filter, $page_size=$page_size, $sort=$sort); ``` -#### [Get Flow Action Relationships Flow](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_action_relationships_flow) +#### [Get Flow Action Relationships Flow](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_action_relationships_flow) ```php ## Positional Arguments @@ -1582,7 +1695,7 @@ $klaviyo->Flows->getFlowActionRelationshipsFlow($id); -#### [Get Flow Action Relationships Messages](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_action_relationships_messages) +#### [Get Flow Action Relationships Messages](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_action_relationships_messages) ```php ## Positional Arguments @@ -1602,7 +1715,7 @@ $klaviyo->Flows->getFlowActionRelationshipsMessages($id, $filter=$filter, $page_ -#### [Get Flow Actions For Flow](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_flow_actions) +#### [Get Flow Flow Actions](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_flow_actions) ```php ## Positional Arguments @@ -1623,7 +1736,7 @@ $klaviyo->Flows->getFlowFlowActions($id, $fields_flow_action=$fields_flow_action -#### [Get Flow Message](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_message) +#### [Get Flow Message](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_message) ```php ## Positional Arguments @@ -1642,7 +1755,7 @@ $klaviyo->Flows->getFlowMessage($id, $fields_flow_action=$fields_flow_action, $f -#### [Get Flow Action For Message](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_message_action) +#### [Get Flow Action For Message](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_message_action) ```php ## Positional Arguments @@ -1659,7 +1772,7 @@ $klaviyo->Flows->getFlowMessageAction($id, $fields_flow_action=$fields_flow_acti -#### [Get Flow Message Relationships Action](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_message_relationships_action) +#### [Get Flow Message Relationships Action](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_message_relationships_action) ```php ## Positional Arguments @@ -1672,7 +1785,7 @@ $klaviyo->Flows->getFlowMessageRelationshipsAction($id); -#### [Get Flow Relationships Flow Actions](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_relationships_flow_actions) +#### [Get Flow Relationships Flow Actions](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_relationships_flow_actions) ```php ## Positional Arguments @@ -1691,7 +1804,7 @@ $klaviyo->Flows->getFlowRelationshipsFlowActions($id, $filter=$filter, $page_siz -#### [Get Flow Relationships Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_relationships_tags) +#### [Get Flow Relationships Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_relationships_tags) ```php ## Positional Arguments @@ -1704,7 +1817,7 @@ $klaviyo->Flows->getFlowRelationshipsTags($id); -#### [Get Flow Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flow_tags) +#### [Get Flow Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flow_tags) ```php ## Positional Arguments @@ -1721,7 +1834,7 @@ $klaviyo->Flows->getFlowTags($id, $fields_tag=$fields_tag); -#### [Get Flows](https://developers.klaviyo.com/en/v2023-06-15/reference/get_flows) +#### [Get Flows](https://developers.klaviyo.com/en/v2023-07-15/reference/get_flows) ```php @@ -1729,19 +1842,20 @@ $klaviyo->Flows->getFlowTags($id, $fields_tag=$fields_tag); # $fields_flow_action | string[] # $fields_flow | string[] +# $fields_tag | string[] # $filter | string # $include | string[] # $page_cursor | string # $page_size | int # $sort | string -$klaviyo->Flows->getFlows($fields_flow_action=$fields_flow_action, $fields_flow=$fields_flow, $filter=$filter, $include=$include, $page_cursor=$page_cursor, $page_size=$page_size, $sort=$sort); +$klaviyo->Flows->getFlows($fields_flow_action=$fields_flow_action, $fields_flow=$fields_flow, $fields_tag=$fields_tag, $filter=$filter, $include=$include, $page_cursor=$page_cursor, $page_size=$page_size, $sort=$sort); ``` -#### [Update Flow Status](https://developers.klaviyo.com/en/v2023-06-15/reference/update_flow) +#### [Update Flow Status](https://developers.klaviyo.com/en/v2023-07-15/reference/update_flow) ```php ## Positional Arguments @@ -1759,7 +1873,7 @@ $klaviyo->Flows->updateFlow($id, $body); ## Lists -#### [Create List](https://developers.klaviyo.com/en/v2023-06-15/reference/create_list) +#### [Create List](https://developers.klaviyo.com/en/v2023-07-15/reference/create_list) ```php ## Positional Arguments @@ -1772,7 +1886,7 @@ $klaviyo->Lists->createList($body); -#### [Add Profile To List](https://developers.klaviyo.com/en/v2023-06-15/reference/create_list_relationships) +#### [Add Profile To List](https://developers.klaviyo.com/en/v2023-07-15/reference/create_list_relationships) ```php ## Positional Arguments @@ -1786,7 +1900,7 @@ $klaviyo->Lists->createListRelationships($id, $body); -#### [Delete List](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_list) +#### [Delete List](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_list) ```php ## Positional Arguments @@ -1799,7 +1913,7 @@ $klaviyo->Lists->deleteList($id); -#### [Remove Profile From List](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_list_relationships) +#### [Remove Profile From List](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_list_relationships) ```php ## Positional Arguments @@ -1813,7 +1927,7 @@ $klaviyo->Lists->deleteListRelationships($id, $body); -#### [Get List](https://developers.klaviyo.com/en/v2023-06-15/reference/get_list) +#### [Get List](https://developers.klaviyo.com/en/v2023-07-15/reference/get_list) ```php ## Positional Arguments @@ -1822,15 +1936,18 @@ $klaviyo->Lists->deleteListRelationships($id, $body); ## Keyword Arguments +# $additional_fields_list | string[] # $fields_list | string[] +# $fields_tag | string[] +# $include | string[] -$klaviyo->Lists->getList($id, $fields_list=$fields_list); +$klaviyo->Lists->getList($id, $additional_fields_list=$additional_fields_list, $fields_list=$fields_list, $fields_tag=$fields_tag, $include=$include); ``` -#### [Get List Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_list_profiles) +#### [Get List Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/get_list_profiles) ```php ## Positional Arguments @@ -1851,7 +1968,7 @@ $klaviyo->Lists->getListProfiles($id, $additional_fields_profile=$additional_fie -#### [Get List Relationships Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_list_relationships_profiles) +#### [Get List Relationships Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/get_list_relationships_profiles) ```php ## Positional Arguments @@ -1868,7 +1985,7 @@ $klaviyo->Lists->getListRelationshipsProfiles($id, $page_cursor=$page_cursor); -#### [Get List Relationships Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_list_relationships_tags) +#### [Get List Relationships Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_list_relationships_tags) ```php ## Positional Arguments @@ -1881,7 +1998,7 @@ $klaviyo->Lists->getListRelationshipsTags($id); -#### [Get List Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_list_tags) +#### [Get List Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_list_tags) ```php ## Positional Arguments @@ -1898,23 +2015,25 @@ $klaviyo->Lists->getListTags($id, $fields_tag=$fields_tag); -#### [Get Lists](https://developers.klaviyo.com/en/v2023-06-15/reference/get_lists) +#### [Get Lists](https://developers.klaviyo.com/en/v2023-07-15/reference/get_lists) ```php ## Keyword Arguments # $fields_list | string[] +# $fields_tag | string[] # $filter | string +# $include | string[] # $page_cursor | string -$klaviyo->Lists->getLists($fields_list=$fields_list, $filter=$filter, $page_cursor=$page_cursor); +$klaviyo->Lists->getLists($fields_list=$fields_list, $fields_tag=$fields_tag, $filter=$filter, $include=$include, $page_cursor=$page_cursor); ``` -#### [Update List](https://developers.klaviyo.com/en/v2023-06-15/reference/update_list) +#### [Update List](https://developers.klaviyo.com/en/v2023-07-15/reference/update_list) ```php ## Positional Arguments @@ -1932,7 +2051,7 @@ $klaviyo->Lists->updateList($id, $body); ## Metrics -#### [Get Metric](https://developers.klaviyo.com/en/v2023-06-15/reference/get_metric) +#### [Get Metric](https://developers.klaviyo.com/en/v2023-07-15/reference/get_metric) ```php ## Positional Arguments @@ -1949,7 +2068,7 @@ $klaviyo->Metrics->getMetric($id, $fields_metric=$fields_metric); -#### [Get Metrics](https://developers.klaviyo.com/en/v2023-06-15/reference/get_metrics) +#### [Get Metrics](https://developers.klaviyo.com/en/v2023-07-15/reference/get_metrics) ```php @@ -1965,7 +2084,7 @@ $klaviyo->Metrics->getMetrics($fields_metric=$fields_metric, $filter=$filter, $p -#### [Query Metric Aggregates](https://developers.klaviyo.com/en/v2023-06-15/reference/query_metric_aggregates) +#### [Query Metric Aggregates](https://developers.klaviyo.com/en/v2023-07-15/reference/query_metric_aggregates) ```php ## Positional Arguments @@ -1982,7 +2101,7 @@ $klaviyo->Metrics->queryMetricAggregates($body); ## Profiles -#### [Create Profile](https://developers.klaviyo.com/en/v2023-06-15/reference/create_profile) +#### [Create Profile](https://developers.klaviyo.com/en/v2023-07-15/reference/create_profile) ```php ## Positional Arguments @@ -1995,7 +2114,7 @@ $klaviyo->Profiles->createProfile($body); -#### [Get Profile](https://developers.klaviyo.com/en/v2023-06-15/reference/get_profile) +#### [Get Profile](https://developers.klaviyo.com/en/v2023-07-15/reference/get_profile) ```php ## Positional Arguments @@ -2016,7 +2135,7 @@ $klaviyo->Profiles->getProfile($id, $additional_fields_profile=$additional_field -#### [Get Profile Lists](https://developers.klaviyo.com/en/v2023-06-15/reference/get_profile_lists) +#### [Get Profile Lists](https://developers.klaviyo.com/en/v2023-07-15/reference/get_profile_lists) ```php ## Positional Arguments @@ -2033,7 +2152,7 @@ $klaviyo->Profiles->getProfileLists($id, $fields_list=$fields_list); -#### [Get Profile Relationships Lists](https://developers.klaviyo.com/en/v2023-06-15/reference/get_profile_relationships_lists) +#### [Get Profile Relationships Lists](https://developers.klaviyo.com/en/v2023-07-15/reference/get_profile_relationships_lists) ```php ## Positional Arguments @@ -2046,7 +2165,7 @@ $klaviyo->Profiles->getProfileRelationshipsLists($id); -#### [Get Profile Relationships Segments](https://developers.klaviyo.com/en/v2023-06-15/reference/get_profile_relationships_segments) +#### [Get Profile Relationships Segments](https://developers.klaviyo.com/en/v2023-07-15/reference/get_profile_relationships_segments) ```php ## Positional Arguments @@ -2059,7 +2178,7 @@ $klaviyo->Profiles->getProfileRelationshipsSegments($id); -#### [Get Profile Segments](https://developers.klaviyo.com/en/v2023-06-15/reference/get_profile_segments) +#### [Get Profile Segments](https://developers.klaviyo.com/en/v2023-07-15/reference/get_profile_segments) ```php ## Positional Arguments @@ -2076,7 +2195,7 @@ $klaviyo->Profiles->getProfileSegments($id, $fields_segment=$fields_segment); -#### [Get Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_profiles) +#### [Get Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/get_profiles) ```php @@ -2095,7 +2214,7 @@ $klaviyo->Profiles->getProfiles($additional_fields_profile=$additional_fields_pr -#### [Subscribe Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/subscribe_profiles) +#### [Subscribe Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/subscribe_profiles) ```php ## Positional Arguments @@ -2108,7 +2227,7 @@ $klaviyo->Profiles->subscribeProfiles($body); -#### [Suppress Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/suppress_profiles) +#### [Suppress Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/suppress_profiles) ```php ## Positional Arguments @@ -2121,7 +2240,7 @@ $klaviyo->Profiles->suppressProfiles($body); -#### [Unsubscribe Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/unsubscribe_profiles) +#### [Unsubscribe Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/unsubscribe_profiles) ```php ## Positional Arguments @@ -2134,7 +2253,7 @@ $klaviyo->Profiles->unsubscribeProfiles($body); -#### [Unsuppress Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/unsuppress_profiles) +#### [Unsuppress Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/unsuppress_profiles) ```php ## Positional Arguments @@ -2147,7 +2266,7 @@ $klaviyo->Profiles->unsuppressProfiles($body); -#### [Update Profile](https://developers.klaviyo.com/en/v2023-06-15/reference/update_profile) +#### [Update Profile](https://developers.klaviyo.com/en/v2023-07-15/reference/update_profile) ```php ## Positional Arguments @@ -2165,7 +2284,7 @@ $klaviyo->Profiles->updateProfile($id, $body); ## Segments -#### [Get Segment](https://developers.klaviyo.com/en/v2023-06-15/reference/get_segment) +#### [Get Segment](https://developers.klaviyo.com/en/v2023-07-15/reference/get_segment) ```php ## Positional Arguments @@ -2174,15 +2293,18 @@ $klaviyo->Profiles->updateProfile($id, $body); ## Keyword Arguments +# $additional_fields_segment | string[] # $fields_segment | string[] +# $fields_tag | string[] +# $include | string[] -$klaviyo->Segments->getSegment($id, $fields_segment=$fields_segment); +$klaviyo->Segments->getSegment($id, $additional_fields_segment=$additional_fields_segment, $fields_segment=$fields_segment, $fields_tag=$fields_tag, $include=$include); ``` -#### [Get Segment Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_segment_profiles) +#### [Get Segment Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/get_segment_profiles) ```php ## Positional Arguments @@ -2203,7 +2325,7 @@ $klaviyo->Segments->getSegmentProfiles($id, $additional_fields_profile=$addition -#### [Get Segment Relationships Profiles](https://developers.klaviyo.com/en/v2023-06-15/reference/get_segment_relationships_profiles) +#### [Get Segment Relationships Profiles](https://developers.klaviyo.com/en/v2023-07-15/reference/get_segment_relationships_profiles) ```php ## Positional Arguments @@ -2220,7 +2342,7 @@ $klaviyo->Segments->getSegmentRelationshipsProfiles($id, $page_cursor=$page_curs -#### [Get Segment Relationships Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_segment_relationships_tags) +#### [Get Segment Relationships Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_segment_relationships_tags) ```php ## Positional Arguments @@ -2233,7 +2355,7 @@ $klaviyo->Segments->getSegmentRelationshipsTags($id); -#### [Get Segment Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_segment_tags) +#### [Get Segment Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_segment_tags) ```php ## Positional Arguments @@ -2250,23 +2372,25 @@ $klaviyo->Segments->getSegmentTags($id, $fields_tag=$fields_tag); -#### [Get Segments](https://developers.klaviyo.com/en/v2023-06-15/reference/get_segments) +#### [Get Segments](https://developers.klaviyo.com/en/v2023-07-15/reference/get_segments) ```php ## Keyword Arguments # $fields_segment | string[] +# $fields_tag | string[] # $filter | string +# $include | string[] # $page_cursor | string -$klaviyo->Segments->getSegments($fields_segment=$fields_segment, $filter=$filter, $page_cursor=$page_cursor); +$klaviyo->Segments->getSegments($fields_segment=$fields_segment, $fields_tag=$fields_tag, $filter=$filter, $include=$include, $page_cursor=$page_cursor); ``` -#### [Update Segment](https://developers.klaviyo.com/en/v2023-06-15/reference/update_segment) +#### [Update Segment](https://developers.klaviyo.com/en/v2023-07-15/reference/update_segment) ```php ## Positional Arguments @@ -2284,7 +2408,7 @@ $klaviyo->Segments->updateSegment($id, $body); ## Tags -#### [Create Tag](https://developers.klaviyo.com/en/v2023-06-15/reference/create_tag) +#### [Create Tag](https://developers.klaviyo.com/en/v2023-07-15/reference/create_tag) ```php ## Positional Arguments @@ -2297,7 +2421,7 @@ $klaviyo->Tags->createTag($body); -#### [Create Tag Group](https://developers.klaviyo.com/en/v2023-06-15/reference/create_tag_group) +#### [Create Tag Group](https://developers.klaviyo.com/en/v2023-07-15/reference/create_tag_group) ```php ## Positional Arguments @@ -2310,7 +2434,7 @@ $klaviyo->Tags->createTagGroup($body); -#### [Create Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2023-06-15/reference/create_tag_relationships_campaigns) +#### [Create Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2023-07-15/reference/create_tag_relationships_campaigns) ```php ## Positional Arguments @@ -2324,7 +2448,7 @@ $klaviyo->Tags->createTagRelationshipsCampaigns($id, $body); -#### [Create Tag Relationships Flows](https://developers.klaviyo.com/en/v2023-06-15/reference/create_tag_relationships_flows) +#### [Create Tag Relationships Flows](https://developers.klaviyo.com/en/v2023-07-15/reference/create_tag_relationships_flows) ```php ## Positional Arguments @@ -2338,7 +2462,7 @@ $klaviyo->Tags->createTagRelationshipsFlows($id, $body); -#### [Create Tag Relationships Lists](https://developers.klaviyo.com/en/v2023-06-15/reference/create_tag_relationships_lists) +#### [Create Tag Relationships Lists](https://developers.klaviyo.com/en/v2023-07-15/reference/create_tag_relationships_lists) ```php ## Positional Arguments @@ -2352,7 +2476,7 @@ $klaviyo->Tags->createTagRelationshipsLists($id, $body); -#### [Create Tag Relationships Segments](https://developers.klaviyo.com/en/v2023-06-15/reference/create_tag_relationships_segments) +#### [Create Tag Relationships Segments](https://developers.klaviyo.com/en/v2023-07-15/reference/create_tag_relationships_segments) ```php ## Positional Arguments @@ -2366,7 +2490,7 @@ $klaviyo->Tags->createTagRelationshipsSegments($id, $body); -#### [Delete Tag](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_tag) +#### [Delete Tag](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_tag) ```php ## Positional Arguments @@ -2379,7 +2503,7 @@ $klaviyo->Tags->deleteTag($id); -#### [Delete Tag Group](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_tag_group) +#### [Delete Tag Group](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_tag_group) ```php ## Positional Arguments @@ -2392,7 +2516,7 @@ $klaviyo->Tags->deleteTagGroup($id); -#### [Delete Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_tag_relationships_campaigns) +#### [Delete Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_tag_relationships_campaigns) ```php ## Positional Arguments @@ -2406,7 +2530,7 @@ $klaviyo->Tags->deleteTagRelationshipsCampaigns($id, $body); -#### [Delete Tag Relationships Flows](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_tag_relationships_flows) +#### [Delete Tag Relationships Flows](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_tag_relationships_flows) ```php ## Positional Arguments @@ -2420,7 +2544,7 @@ $klaviyo->Tags->deleteTagRelationshipsFlows($id, $body); -#### [Delete Tag Relationships Lists](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_tag_relationships_lists) +#### [Delete Tag Relationships Lists](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_tag_relationships_lists) ```php ## Positional Arguments @@ -2434,7 +2558,7 @@ $klaviyo->Tags->deleteTagRelationshipsLists($id, $body); -#### [Delete Tag Relationships Segments](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_tag_relationships_segments) +#### [Delete Tag Relationships Segments](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_tag_relationships_segments) ```php ## Positional Arguments @@ -2448,7 +2572,7 @@ $klaviyo->Tags->deleteTagRelationshipsSegments($id, $body); -#### [Get Tag](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag) +#### [Get Tag](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag) ```php ## Positional Arguments @@ -2457,15 +2581,17 @@ $klaviyo->Tags->deleteTagRelationshipsSegments($id, $body); ## Keyword Arguments +# $fields_tag_group | string[] # $fields_tag | string[] +# $include | string[] -$klaviyo->Tags->getTag($id, $fields_tag=$fields_tag); +$klaviyo->Tags->getTag($id, $fields_tag_group=$fields_tag_group, $fields_tag=$fields_tag, $include=$include); ``` -#### [Get Tag Group](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_group) +#### [Get Tag Group](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_group) ```php ## Positional Arguments @@ -2482,7 +2608,7 @@ $klaviyo->Tags->getTagGroup($id, $fields_tag_group=$fields_tag_group); -#### [Get Tag Group Relationships Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_group_relationships_tags) +#### [Get Tag Group Relationships Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_group_relationships_tags) ```php ## Positional Arguments @@ -2495,7 +2621,7 @@ $klaviyo->Tags->getTagGroupRelationshipsTags($id); -#### [Get Tag Group Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_group_tags) +#### [Get Tag Group Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_group_tags) ```php ## Positional Arguments @@ -2512,7 +2638,7 @@ $klaviyo->Tags->getTagGroupTags($id, $fields_tag=$fields_tag); -#### [Get Tag Groups](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_groups) +#### [Get Tag Groups](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_groups) ```php @@ -2529,7 +2655,7 @@ $klaviyo->Tags->getTagGroups($fields_tag_group=$fields_tag_group, $filter=$filte -#### [Get Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_relationships_campaigns) +#### [Get Tag Relationships Campaigns](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_relationships_campaigns) ```php ## Positional Arguments @@ -2542,7 +2668,7 @@ $klaviyo->Tags->getTagRelationshipsCampaigns($id); -#### [Get Tag Relationships Flows](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_relationships_flows) +#### [Get Tag Relationships Flows](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_relationships_flows) ```php ## Positional Arguments @@ -2555,7 +2681,7 @@ $klaviyo->Tags->getTagRelationshipsFlows($id); -#### [Get Tag Relationships Lists](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_relationships_lists) +#### [Get Tag Relationships Lists](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_relationships_lists) ```php ## Positional Arguments @@ -2568,7 +2694,7 @@ $klaviyo->Tags->getTagRelationshipsLists($id); -#### [Get Tag Relationships Segments](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_relationships_segments) +#### [Get Tag Relationships Segments](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_relationships_segments) ```php ## Positional Arguments @@ -2581,7 +2707,7 @@ $klaviyo->Tags->getTagRelationshipsSegments($id); -#### [Get Tag Relationships Tag Group](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_relationships_tag_group) +#### [Get Tag Relationships Tag Group](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_relationships_tag_group) ```php ## Positional Arguments @@ -2594,7 +2720,7 @@ $klaviyo->Tags->getTagRelationshipsTagGroup($id); -#### [Get Tag Tag Group](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tag_tag_group) +#### [Get Tag Tag Group](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tag_tag_group) ```php ## Positional Arguments @@ -2611,24 +2737,26 @@ $klaviyo->Tags->getTagTagGroup($id, $fields_tag_group=$fields_tag_group); -#### [Get Tags](https://developers.klaviyo.com/en/v2023-06-15/reference/get_tags) +#### [Get Tags](https://developers.klaviyo.com/en/v2023-07-15/reference/get_tags) ```php ## Keyword Arguments +# $fields_tag_group | string[] # $fields_tag | string[] # $filter | string +# $include | string[] # $page_cursor | string # $sort | string -$klaviyo->Tags->getTags($fields_tag=$fields_tag, $filter=$filter, $page_cursor=$page_cursor, $sort=$sort); +$klaviyo->Tags->getTags($fields_tag_group=$fields_tag_group, $fields_tag=$fields_tag, $filter=$filter, $include=$include, $page_cursor=$page_cursor, $sort=$sort); ``` -#### [Update Tag](https://developers.klaviyo.com/en/v2023-06-15/reference/update_tag) +#### [Update Tag](https://developers.klaviyo.com/en/v2023-07-15/reference/update_tag) ```php ## Positional Arguments @@ -2642,7 +2770,7 @@ $klaviyo->Tags->updateTag($id, $body); -#### [Update Tag Group](https://developers.klaviyo.com/en/v2023-06-15/reference/update_tag_group) +#### [Update Tag Group](https://developers.klaviyo.com/en/v2023-07-15/reference/update_tag_group) ```php ## Positional Arguments @@ -2660,7 +2788,7 @@ $klaviyo->Tags->updateTagGroup($id, $body); ## Templates -#### [Create Template](https://developers.klaviyo.com/en/v2023-06-15/reference/create_template) +#### [Create Template](https://developers.klaviyo.com/en/v2023-07-15/reference/create_template) ```php ## Positional Arguments @@ -2673,7 +2801,7 @@ $klaviyo->Templates->createTemplate($body); -#### [Create Template Clone](https://developers.klaviyo.com/en/v2023-06-15/reference/create_template_clone) +#### [Create Template Clone](https://developers.klaviyo.com/en/v2023-07-15/reference/create_template_clone) ```php ## Positional Arguments @@ -2686,7 +2814,7 @@ $klaviyo->Templates->createTemplateClone($body); -#### [Create Template Render](https://developers.klaviyo.com/en/v2023-06-15/reference/create_template_render) +#### [Create Template Render](https://developers.klaviyo.com/en/v2023-07-15/reference/create_template_render) ```php ## Positional Arguments @@ -2699,7 +2827,7 @@ $klaviyo->Templates->createTemplateRender($body); -#### [Delete Template](https://developers.klaviyo.com/en/v2023-06-15/reference/delete_template) +#### [Delete Template](https://developers.klaviyo.com/en/v2023-07-15/reference/delete_template) ```php ## Positional Arguments @@ -2712,7 +2840,7 @@ $klaviyo->Templates->deleteTemplate($id); -#### [Get Template](https://developers.klaviyo.com/en/v2023-06-15/reference/get_template) +#### [Get Template](https://developers.klaviyo.com/en/v2023-07-15/reference/get_template) ```php ## Positional Arguments @@ -2729,7 +2857,7 @@ $klaviyo->Templates->getTemplate($id, $fields_template=$fields_template); -#### [Get Templates](https://developers.klaviyo.com/en/v2023-06-15/reference/get_templates) +#### [Get Templates](https://developers.klaviyo.com/en/v2023-07-15/reference/get_templates) ```php @@ -2746,7 +2874,7 @@ $klaviyo->Templates->getTemplates($fields_template=$fields_template, $filter=$fi -#### [Update Template](https://developers.klaviyo.com/en/v2023-06-15/reference/update_template) +#### [Update Template](https://developers.klaviyo.com/en/v2023-07-15/reference/update_template) ```php ## Positional Arguments diff --git a/composer.json b/composer.json index 9c3a80e..352236c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "klaviyo/api", - "version": "4.0.0", + "version": "5.0.0", "description": "PHP SDK for Klaviyo's API.", "keywords": [ "openapitools", diff --git a/lib/API/AccountsApi.php b/lib/API/AccountsApi.php index dbec8be..6637783 100644 --- a/lib/API/AccountsApi.php +++ b/lib/API/AccountsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -122,7 +122,7 @@ 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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -140,7 +140,7 @@ 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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -478,7 +478,7 @@ public function getAccountRequest($id, $fields_account = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -500,7 +500,7 @@ 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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -517,7 +517,7 @@ 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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -705,7 +705,7 @@ function ($response) { * * Get Accounts * - * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -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-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_account For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -838,7 +838,7 @@ public function getAccountsRequest($fields_account = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/CampaignsApi.php b/lib/API/CampaignsApi.php index 61fa734..8dca196 100644 --- a/lib/API/CampaignsApi.php +++ b/lib/API/CampaignsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -462,7 +462,7 @@ public function createCampaignRequest($campaign_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -825,7 +825,7 @@ public function createCampaignCloneRequest($campaign_clone_query, $apiKey = null $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1188,7 +1188,7 @@ public function createCampaignMessageAssignTemplateRequest($campaign_message_ass $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1551,7 +1551,7 @@ public function createCampaignRecipientEstimationJobRequest($campaign_recipient_ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1914,7 +1914,7 @@ public function createCampaignSendJobRequest($campaign_send_job_create_query, $a $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2167,7 +2167,7 @@ public function deleteCampaignRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2190,17 +2190,18 @@ public function deleteCampaignRequest($id, $apiKey = null) * Get Campaign * * @param string $id The campaign ID to be retrieved (required) - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getCampaign($id, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) + public function getCampaign($id, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) { - list($response) = $this->getCampaignWithHttpInfo($id, $fields_campaign, $fields_tag, $include, $apiKey); + list($response) = $this->getCampaignWithHttpInfo($id, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $apiKey); return $response; } @@ -2210,17 +2211,18 @@ public function getCampaign($id, $fields_campaign = null, $fields_tag = null, $i * Get Campaign * * @param string $id The campaign ID to be retrieved (required) - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignWithHttpInfo($id, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) + public function getCampaignWithHttpInfo($id, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) { - $request = $this->getCampaignRequest($id, $fields_campaign, $fields_tag, $include, $apiKey); + $request = $this->getCampaignRequest($id, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $apiKey); try { $options = $this->createHttpClientOption(); @@ -2381,16 +2383,17 @@ public function getCampaignWithHttpInfo($id, $fields_campaign = null, $fields_ta * Get Campaign * * @param string $id The campaign ID to be retrieved (required) - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsync($id, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) + public function getCampaignAsync($id, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) { - return $this->getCampaignAsyncWithHttpInfo($id, $fields_campaign, $fields_tag, $include, $apiKey) + return $this->getCampaignAsyncWithHttpInfo($id, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $apiKey) ->then( function ($response) { return $response[0]; @@ -2404,17 +2407,18 @@ function ($response) { * Get Campaign * * @param string $id The campaign ID to be retrieved (required) - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsyncWithHttpInfo($id, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) + public function getCampaignAsyncWithHttpInfo($id, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getCampaignRequest($id, $fields_campaign, $fields_tag, $include, $apiKey); + $request = $this->getCampaignRequest($id, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2461,14 +2465,15 @@ function ($exception) { * Create request for operation 'getCampaign' * * @param string $id The campaign ID to be retrieved (required) - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCampaignRequest($id, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) + public function getCampaignRequest($id, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -2484,6 +2489,15 @@ public function getCampaignRequest($id, $fields_campaign = null, $fields_tag = n $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign_message, + 'fields[campaign-message]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $fields_campaign, @@ -2504,8 +2518,2338 @@ public function getCampaignRequest($id, $fields_campaign = null, $fields_tag = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include, - 'include', // param base name + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCampaignCampaignMessages + * + * Get Campaign Campaign Messages + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + */ + public function getCampaignCampaignMessages($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + list($response) = $this->getCampaignCampaignMessagesWithHttpInfo($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey); + return $response; + } + + /** + * Operation getCampaignCampaignMessagesWithHttpInfo + * + * Get Campaign Campaign Messages + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getCampaignCampaignMessagesWithHttpInfo($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + $request = $this->getCampaignCampaignMessagesRequest($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array<string,mixed>' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'array'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'array', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCampaignCampaignMessagesAsync + * + * Get Campaign Campaign Messages + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignCampaignMessagesAsync($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + return $this->getCampaignCampaignMessagesAsyncWithHttpInfo($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCampaignCampaignMessagesAsyncWithHttpInfo + * + * Get Campaign Campaign Messages + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignCampaignMessagesAsyncWithHttpInfo($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + $returnType = 'array'; + $request = $this->getCampaignCampaignMessagesRequest($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCampaignCampaignMessages' + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCampaignCampaignMessagesRequest($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCampaignCampaignMessages' + ); + } + + $resourcePath = '/api/campaigns/{id}/campaign-messages/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign_message, + 'fields[campaign-message]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign, + 'fields[campaign]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_template, + 'fields[template]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCampaignMessage + * + * Get Campaign Message + * + * @param string $id The message ID to be retrieved (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + */ + public function getCampaignMessage($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + list($response) = $this->getCampaignMessageWithHttpInfo($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey); + return $response; + } + + /** + * Operation getCampaignMessageWithHttpInfo + * + * Get Campaign Message + * + * @param string $id The message ID to be retrieved (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getCampaignMessageWithHttpInfo($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + $request = $this->getCampaignMessageRequest($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array<string,mixed>' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'array'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'array', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCampaignMessageAsync + * + * Get Campaign Message + * + * @param string $id The message ID to be retrieved (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageAsync($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + return $this->getCampaignMessageAsyncWithHttpInfo($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCampaignMessageAsyncWithHttpInfo + * + * Get Campaign Message + * + * @param string $id The message ID to be retrieved (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageAsyncWithHttpInfo($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + $returnType = 'array'; + $request = $this->getCampaignMessageRequest($id, $fields_campaign_message, $fields_campaign, $fields_template, $include, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCampaignMessage' + * + * @param string $id The message ID to be retrieved (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCampaignMessageRequest($id, $fields_campaign_message = null, $fields_campaign = null, $fields_template = null, $include = null, $apiKey = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCampaignMessage' + ); + } + + $resourcePath = '/api/campaign-messages/{id}/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign_message, + 'fields[campaign-message]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign, + 'fields[campaign]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_template, + 'fields[template]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCampaignMessageCampaign + * + * Get Campaign Message Campaign + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + */ + public function getCampaignMessageCampaign($id, $fields_campaign_message = null, $apiKey = null) + { + list($response) = $this->getCampaignMessageCampaignWithHttpInfo($id, $fields_campaign_message, $apiKey); + return $response; + } + + /** + * Operation getCampaignMessageCampaignWithHttpInfo + * + * Get Campaign Message Campaign + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getCampaignMessageCampaignWithHttpInfo($id, $fields_campaign_message = null, $apiKey = null) + { + $request = $this->getCampaignMessageCampaignRequest($id, $fields_campaign_message, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array<string,mixed>' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'array'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'array', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCampaignMessageCampaignAsync + * + * Get Campaign Message Campaign + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageCampaignAsync($id, $fields_campaign_message = null, $apiKey = null) + { + return $this->getCampaignMessageCampaignAsyncWithHttpInfo($id, $fields_campaign_message, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCampaignMessageCampaignAsyncWithHttpInfo + * + * Get Campaign Message Campaign + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageCampaignAsyncWithHttpInfo($id, $fields_campaign_message = null, $apiKey = null) + { + $returnType = 'array'; + $request = $this->getCampaignMessageCampaignRequest($id, $fields_campaign_message, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCampaignMessageCampaign' + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCampaignMessageCampaignRequest($id, $fields_campaign_message = null, $apiKey = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCampaignMessageCampaign' + ); + } + + $resourcePath = '/api/campaign-messages/{id}/campaign/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign_message, + 'fields[campaign-message]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCampaignMessageRelationshipsCampaign + * + * Get Campaign Message Relationships Campaign + * + * @param string $id (required) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + */ + public function getCampaignMessageRelationshipsCampaign($id, $apiKey = null) + { + list($response) = $this->getCampaignMessageRelationshipsCampaignWithHttpInfo($id, $apiKey); + return $response; + } + + /** + * Operation getCampaignMessageRelationshipsCampaignWithHttpInfo + * + * Get Campaign Message Relationships Campaign + * + * @param string $id (required) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getCampaignMessageRelationshipsCampaignWithHttpInfo($id, $apiKey = null) + { + $request = $this->getCampaignMessageRelationshipsCampaignRequest($id, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array<string,mixed>' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'array'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'array', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCampaignMessageRelationshipsCampaignAsync + * + * Get Campaign Message Relationships Campaign + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageRelationshipsCampaignAsync($id, $apiKey = null) + { + return $this->getCampaignMessageRelationshipsCampaignAsyncWithHttpInfo($id, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCampaignMessageRelationshipsCampaignAsyncWithHttpInfo + * + * Get Campaign Message Relationships Campaign + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageRelationshipsCampaignAsyncWithHttpInfo($id, $apiKey = null) + { + $returnType = 'array'; + $request = $this->getCampaignMessageRelationshipsCampaignRequest($id, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCampaignMessageRelationshipsCampaign' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCampaignMessageRelationshipsCampaignRequest($id, $apiKey = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCampaignMessageRelationshipsCampaign' + ); + } + + $resourcePath = '/api/campaign-messages/{id}/relationships/campaign/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCampaignMessageRelationshipsTemplate + * + * Get Campaign Message Relationships Template + * + * @param string $id (required) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + */ + public function getCampaignMessageRelationshipsTemplate($id, $apiKey = null) + { + list($response) = $this->getCampaignMessageRelationshipsTemplateWithHttpInfo($id, $apiKey); + return $response; + } + + /** + * Operation getCampaignMessageRelationshipsTemplateWithHttpInfo + * + * Get Campaign Message Relationships Template + * + * @param string $id (required) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getCampaignMessageRelationshipsTemplateWithHttpInfo($id, $apiKey = null) + { + $request = $this->getCampaignMessageRelationshipsTemplateRequest($id, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array<string,mixed>' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'array'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'array', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCampaignMessageRelationshipsTemplateAsync + * + * Get Campaign Message Relationships Template + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageRelationshipsTemplateAsync($id, $apiKey = null) + { + return $this->getCampaignMessageRelationshipsTemplateAsyncWithHttpInfo($id, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCampaignMessageRelationshipsTemplateAsyncWithHttpInfo + * + * Get Campaign Message Relationships Template + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageRelationshipsTemplateAsyncWithHttpInfo($id, $apiKey = null) + { + $returnType = 'array'; + $request = $this->getCampaignMessageRelationshipsTemplateRequest($id, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCampaignMessageRelationshipsTemplate' + * + * @param string $id (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCampaignMessageRelationshipsTemplateRequest($id, $apiKey = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCampaignMessageRelationshipsTemplate' + ); + } + + $resourcePath = '/api/campaign-messages/{id}/relationships/template/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getCampaignMessageTemplate + * + * Get Campaign Message Template + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + */ + public function getCampaignMessageTemplate($id, $fields_campaign_message = null, $apiKey = null) + { + list($response) = $this->getCampaignMessageTemplateWithHttpInfo($id, $fields_campaign_message, $apiKey); + return $response; + } + + /** + * Operation getCampaignMessageTemplateWithHttpInfo + * + * Get Campaign Message Template + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + */ + public function getCampaignMessageTemplateWithHttpInfo($id, $fields_campaign_message = null, $apiKey = null) + { + $request = $this->getCampaignMessageTemplateRequest($id, $fields_campaign_message, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('array' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('array<string,mixed>' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { + $content = json_decode($content); + } + } + + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'array'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'array', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCampaignMessageTemplateAsync + * + * Get Campaign Message Template + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageTemplateAsync($id, $fields_campaign_message = null, $apiKey = null) + { + return $this->getCampaignMessageTemplateAsyncWithHttpInfo($id, $fields_campaign_message, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCampaignMessageTemplateAsyncWithHttpInfo + * + * Get Campaign Message Template + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCampaignMessageTemplateAsyncWithHttpInfo($id, $fields_campaign_message = null, $apiKey = null) + { + $returnType = 'array'; + $request = $this->getCampaignMessageTemplateRequest($id, $fields_campaign_message, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + $parsed_content = json_decode(json_encode($content), TRUE); + if (json_last_error() != JSON_ERROR_NONE) { + $parsed_content = $content; + } + + return [ + $parsed_content, + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCampaignMessageTemplate' + * + * @param string $id (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCampaignMessageTemplateRequest($id, $fields_campaign_message = null, $apiKey = null) + { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $id when calling getCampaignMessageTemplate' + ); + } + + $resourcePath = '/api/campaign-messages/{id}/template/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign_message, + 'fields[campaign-message]', // param base name 'array', // openApiType 'form', // style false, // explode @@ -2574,7 +4918,7 @@ public function getCampaignRequest($id, $fields_campaign = null, $fields_tag = n $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2592,38 +4936,38 @@ public function getCampaignRequest($id, $fields_campaign = null, $fields_tag = n } /** - * Operation getCampaignMessage + * Operation getCampaignRecipientEstimation * - * Get Campaign Message + * Get Campaign Recipient Estimation * - * @param string $id The message ID to be retrieved (required) - * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) + * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getCampaignMessage($id, $fields_campaign_message = null, $apiKey = null) + public function getCampaignRecipientEstimation($id, $fields_campaign_recipient_estimation = null, $apiKey = null) { - list($response) = $this->getCampaignMessageWithHttpInfo($id, $fields_campaign_message, $apiKey); + list($response) = $this->getCampaignRecipientEstimationWithHttpInfo($id, $fields_campaign_recipient_estimation, $apiKey); return $response; } /** - * Operation getCampaignMessageWithHttpInfo + * Operation getCampaignRecipientEstimationWithHttpInfo * - * Get Campaign Message + * Get Campaign Recipient Estimation * - * @param string $id The message ID to be retrieved (required) - * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) + * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignMessageWithHttpInfo($id, $fields_campaign_message = null, $apiKey = null) + public function getCampaignRecipientEstimationWithHttpInfo($id, $fields_campaign_recipient_estimation = null, $apiKey = null) { - $request = $this->getCampaignMessageRequest($id, $fields_campaign_message, $apiKey); + $request = $this->getCampaignRecipientEstimationRequest($id, $fields_campaign_recipient_estimation, $apiKey); try { $options = $this->createHttpClientOption(); @@ -2779,19 +5123,19 @@ public function getCampaignMessageWithHttpInfo($id, $fields_campaign_message = n } /** - * Operation getCampaignMessageAsync + * Operation getCampaignRecipientEstimationAsync * - * Get Campaign Message + * Get Campaign Recipient Estimation * - * @param string $id The message ID to be retrieved (required) - * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) + * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignMessageAsync($id, $fields_campaign_message = null, $apiKey = null) + public function getCampaignRecipientEstimationAsync($id, $fields_campaign_recipient_estimation = null, $apiKey = null) { - return $this->getCampaignMessageAsyncWithHttpInfo($id, $fields_campaign_message, $apiKey) + return $this->getCampaignRecipientEstimationAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation, $apiKey) ->then( function ($response) { return $response[0]; @@ -2800,20 +5144,20 @@ function ($response) { } /** - * Operation getCampaignMessageAsyncWithHttpInfo + * Operation getCampaignRecipientEstimationAsyncWithHttpInfo * - * Get Campaign Message + * Get Campaign Recipient Estimation * - * @param string $id The message ID to be retrieved (required) - * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) + * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignMessageAsyncWithHttpInfo($id, $fields_campaign_message = null, $apiKey = null) + public function getCampaignRecipientEstimationAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getCampaignMessageRequest($id, $fields_campaign_message, $apiKey); + $request = $this->getCampaignRecipientEstimationRequest($id, $fields_campaign_recipient_estimation, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2857,24 +5201,24 @@ function ($exception) { } /** - * Create request for operation 'getCampaignMessage' + * Create request for operation 'getCampaignRecipientEstimation' * - * @param string $id The message ID to be retrieved (required) - * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) + * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCampaignMessageRequest($id, $fields_campaign_message = null, $apiKey = null) + public function getCampaignRecipientEstimationRequest($id, $fields_campaign_recipient_estimation = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getCampaignMessage' + 'Missing the required parameter $id when calling getCampaignRecipientEstimation' ); } - $resourcePath = '/api/campaign-messages/{id}/'; + $resourcePath = '/api/campaign-recipient-estimations/{id}/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2883,8 +5227,8 @@ public function getCampaignMessageRequest($id, $fields_campaign_message = null, // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fields_campaign_message, - 'fields[campaign-message]', // param base name + $fields_campaign_recipient_estimation, + 'fields[campaign-recipient-estimation]', // param base name 'array', // openApiType 'form', // style false, // explode @@ -2953,7 +5297,7 @@ public function getCampaignMessageRequest($id, $fields_campaign_message = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2971,38 +5315,38 @@ public function getCampaignMessageRequest($id, $fields_campaign_message = null, } /** - * Operation getCampaignRecipientEstimation + * Operation getCampaignRecipientEstimationJob * - * Get Campaign Recipient Estimation + * Get Campaign Recipient Estimation Job * - * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) - * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign to get recipient estimation status (required) + * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getCampaignRecipientEstimation($id, $fields_campaign_recipient_estimation = null, $apiKey = null) + public function getCampaignRecipientEstimationJob($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) { - list($response) = $this->getCampaignRecipientEstimationWithHttpInfo($id, $fields_campaign_recipient_estimation, $apiKey); + list($response) = $this->getCampaignRecipientEstimationJobWithHttpInfo($id, $fields_campaign_recipient_estimation_job, $apiKey); return $response; } /** - * Operation getCampaignRecipientEstimationWithHttpInfo + * Operation getCampaignRecipientEstimationJobWithHttpInfo * - * Get Campaign Recipient Estimation + * Get Campaign Recipient Estimation Job * - * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) - * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign to get recipient estimation status (required) + * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignRecipientEstimationWithHttpInfo($id, $fields_campaign_recipient_estimation = null, $apiKey = null) + public function getCampaignRecipientEstimationJobWithHttpInfo($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) { - $request = $this->getCampaignRecipientEstimationRequest($id, $fields_campaign_recipient_estimation, $apiKey); + $request = $this->getCampaignRecipientEstimationJobRequest($id, $fields_campaign_recipient_estimation_job, $apiKey); try { $options = $this->createHttpClientOption(); @@ -3158,19 +5502,19 @@ public function getCampaignRecipientEstimationWithHttpInfo($id, $fields_campaign } /** - * Operation getCampaignRecipientEstimationAsync + * Operation getCampaignRecipientEstimationJobAsync * - * Get Campaign Recipient Estimation + * Get Campaign Recipient Estimation Job * - * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) - * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign to get recipient estimation status (required) + * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignRecipientEstimationAsync($id, $fields_campaign_recipient_estimation = null, $apiKey = null) + public function getCampaignRecipientEstimationJobAsync($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) { - return $this->getCampaignRecipientEstimationAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation, $apiKey) + return $this->getCampaignRecipientEstimationJobAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation_job, $apiKey) ->then( function ($response) { return $response[0]; @@ -3179,20 +5523,20 @@ function ($response) { } /** - * Operation getCampaignRecipientEstimationAsyncWithHttpInfo + * Operation getCampaignRecipientEstimationJobAsyncWithHttpInfo * - * Get Campaign Recipient Estimation + * Get Campaign Recipient Estimation Job * - * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) - * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign to get recipient estimation status (required) + * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignRecipientEstimationAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation = null, $apiKey = null) + public function getCampaignRecipientEstimationJobAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getCampaignRecipientEstimationRequest($id, $fields_campaign_recipient_estimation, $apiKey); + $request = $this->getCampaignRecipientEstimationJobRequest($id, $fields_campaign_recipient_estimation_job, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3236,24 +5580,24 @@ function ($exception) { } /** - * Create request for operation 'getCampaignRecipientEstimation' + * Create request for operation 'getCampaignRecipientEstimationJob' * - * @param string $id The ID of the campaign for which to get the estimated number of recipients (required) - * @param string[] $fields_campaign_recipient_estimation For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id The ID of the campaign to get recipient estimation status (required) + * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCampaignRecipientEstimationRequest($id, $fields_campaign_recipient_estimation = null, $apiKey = null) + public function getCampaignRecipientEstimationJobRequest($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getCampaignRecipientEstimation' + 'Missing the required parameter $id when calling getCampaignRecipientEstimationJob' ); } - $resourcePath = '/api/campaign-recipient-estimations/{id}/'; + $resourcePath = '/api/campaign-recipient-estimation-jobs/{id}/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3262,8 +5606,8 @@ public function getCampaignRecipientEstimationRequest($id, $fields_campaign_reci // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fields_campaign_recipient_estimation, - 'fields[campaign-recipient-estimation]', // param base name + $fields_campaign_recipient_estimation_job, + 'fields[campaign-recipient-estimation-job]', // param base name 'array', // openApiType 'form', // style false, // explode @@ -3332,7 +5676,7 @@ public function getCampaignRecipientEstimationRequest($id, $fields_campaign_reci $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3350,38 +5694,36 @@ public function getCampaignRecipientEstimationRequest($id, $fields_campaign_reci } /** - * Operation getCampaignRecipientEstimationJob + * Operation getCampaignRelationshipsCampaignMessages * - * Get Campaign Recipient Estimation Job + * Get Campaign Relationships Campaign Messages * - * @param string $id The ID of the campaign to get recipient estimation status (required) - * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getCampaignRecipientEstimationJob($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) + public function getCampaignRelationshipsCampaignMessages($id, $apiKey = null) { - list($response) = $this->getCampaignRecipientEstimationJobWithHttpInfo($id, $fields_campaign_recipient_estimation_job, $apiKey); + list($response) = $this->getCampaignRelationshipsCampaignMessagesWithHttpInfo($id, $apiKey); return $response; } /** - * Operation getCampaignRecipientEstimationJobWithHttpInfo + * Operation getCampaignRelationshipsCampaignMessagesWithHttpInfo * - * Get Campaign Recipient Estimation Job + * Get Campaign Relationships Campaign Messages * - * @param string $id The ID of the campaign to get recipient estimation status (required) - * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignRecipientEstimationJobWithHttpInfo($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) + public function getCampaignRelationshipsCampaignMessagesWithHttpInfo($id, $apiKey = null) { - $request = $this->getCampaignRecipientEstimationJobRequest($id, $fields_campaign_recipient_estimation_job, $apiKey); + $request = $this->getCampaignRelationshipsCampaignMessagesRequest($id, $apiKey); try { $options = $this->createHttpClientOption(); @@ -3537,19 +5879,18 @@ public function getCampaignRecipientEstimationJobWithHttpInfo($id, $fields_campa } /** - * Operation getCampaignRecipientEstimationJobAsync + * Operation getCampaignRelationshipsCampaignMessagesAsync * - * Get Campaign Recipient Estimation Job + * Get Campaign Relationships Campaign Messages * - * @param string $id The ID of the campaign to get recipient estimation status (required) - * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignRecipientEstimationJobAsync($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) + public function getCampaignRelationshipsCampaignMessagesAsync($id, $apiKey = null) { - return $this->getCampaignRecipientEstimationJobAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation_job, $apiKey) + return $this->getCampaignRelationshipsCampaignMessagesAsyncWithHttpInfo($id, $apiKey) ->then( function ($response) { return $response[0]; @@ -3558,20 +5899,19 @@ function ($response) { } /** - * Operation getCampaignRecipientEstimationJobAsyncWithHttpInfo + * Operation getCampaignRelationshipsCampaignMessagesAsyncWithHttpInfo * - * Get Campaign Recipient Estimation Job + * Get Campaign Relationships Campaign Messages * - * @param string $id The ID of the campaign to get recipient estimation status (required) - * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignRecipientEstimationJobAsyncWithHttpInfo($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) + public function getCampaignRelationshipsCampaignMessagesAsyncWithHttpInfo($id, $apiKey = null) { $returnType = 'array'; - $request = $this->getCampaignRecipientEstimationJobRequest($id, $fields_campaign_recipient_estimation_job, $apiKey); + $request = $this->getCampaignRelationshipsCampaignMessagesRequest($id, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3615,39 +5955,29 @@ function ($exception) { } /** - * Create request for operation 'getCampaignRecipientEstimationJob' + * Create request for operation 'getCampaignRelationshipsCampaignMessages' * - * @param string $id The ID of the campaign to get recipient estimation status (required) - * @param string[] $fields_campaign_recipient_estimation_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCampaignRecipientEstimationJobRequest($id, $fields_campaign_recipient_estimation_job = null, $apiKey = null) + public function getCampaignRelationshipsCampaignMessagesRequest($id, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getCampaignRecipientEstimationJob' + 'Missing the required parameter $id when calling getCampaignRelationshipsCampaignMessages' ); } - $resourcePath = '/api/campaign-recipient-estimation-jobs/{id}/'; + $resourcePath = '/api/campaigns/{id}/relationships/campaign-messages/'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fields_campaign_recipient_estimation_job, - 'fields[campaign-recipient-estimation-job]', // param base name - 'array', // openApiType - 'form', // style - false, // explode - false // required - ) ?? []); // path params @@ -3711,7 +6041,7 @@ public function getCampaignRecipientEstimationJobRequest($id, $fields_campaign_r $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4076,7 +6406,7 @@ public function getCampaignRelationshipsTagsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4099,7 +6429,7 @@ public function getCampaignRelationshipsTagsRequest($id, $apiKey = null) * Get Campaign Send Job * * @param string $id The ID of the campaign to send (required) - * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4117,7 +6447,7 @@ public function getCampaignSendJob($id, $fields_campaign_send_job = null, $apiKe * Get Campaign Send Job * * @param string $id The ID of the campaign to send (required) - * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4286,7 +6616,7 @@ public function getCampaignSendJobWithHttpInfo($id, $fields_campaign_send_job = * Get Campaign Send Job * * @param string $id The ID of the campaign to send (required) - * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4307,7 +6637,7 @@ function ($response) { * Get Campaign Send Job * * @param string $id The ID of the campaign to send (required) - * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4362,7 +6692,7 @@ function ($exception) { * Create request for operation 'getCampaignSendJob' * * @param string $id The ID of the campaign to send (required) - * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign_send_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4455,7 +6785,7 @@ public function getCampaignSendJobRequest($id, $fields_campaign_send_job = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4478,7 +6808,7 @@ public function getCampaignSendJobRequest($id, $fields_campaign_send_job = null, * Get Campaign Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4496,7 +6826,7 @@ public function getCampaignTags($id, $fields_tag = null, $apiKey = null) * Get Campaign Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4665,7 +6995,7 @@ public function getCampaignTagsWithHttpInfo($id, $fields_tag = null, $apiKey = n * Get Campaign Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4686,7 +7016,7 @@ function ($response) { * Get Campaign Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4741,7 +7071,7 @@ function ($exception) { * Create request for operation 'getCampaignTags' * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4834,7 +7164,7 @@ public function getCampaignTagsRequest($id, $fields_tag = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4856,20 +7186,21 @@ public function getCampaignTagsRequest($id, $fields_tag = null, $apiKey = null) * * Get Campaigns * - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getCampaigns($fields_campaign = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getCampaigns($filter, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { - list($response) = $this->getCampaignsWithHttpInfo($fields_campaign, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey); + list($response) = $this->getCampaignsWithHttpInfo($filter, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $page_cursor, $sort, $apiKey); return $response; } @@ -4878,20 +7209,21 @@ public function getCampaigns($fields_campaign = null, $fields_tag = null, $filte * * Get Campaigns * - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignsWithHttpInfo($fields_campaign = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getCampaignsWithHttpInfo($filter, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { - $request = $this->getCampaignsRequest($fields_campaign, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey); + $request = $this->getCampaignsRequest($filter, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $page_cursor, $sort, $apiKey); try { $options = $this->createHttpClientOption(); @@ -5051,19 +7383,20 @@ public function getCampaignsWithHttpInfo($fields_campaign = null, $fields_tag = * * Get Campaigns * - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsync($fields_campaign = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getCampaignsAsync($filter, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { - return $this->getCampaignsAsyncWithHttpInfo($fields_campaign, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey) + return $this->getCampaignsAsyncWithHttpInfo($filter, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $page_cursor, $sort, $apiKey) ->then( function ($response) { return $response[0]; @@ -5076,20 +7409,21 @@ function ($response) { * * Get Campaigns * - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsyncWithHttpInfo($fields_campaign = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getCampaignsAsyncWithHttpInfo($filter, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getCampaignsRequest($fields_campaign, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey); + $request = $this->getCampaignsRequest($filter, $fields_campaign_message, $fields_campaign, $fields_tag, $include, $page_cursor, $sort, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5135,18 +7469,25 @@ function ($exception) { /** * Create request for operation 'getCampaigns' * - * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (required) + * @param string[] $fields_campaign_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_campaign For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getCampaignsRequest($fields_campaign = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getCampaignsRequest($filter, $fields_campaign_message = null, $fields_campaign = null, $fields_tag = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { + // verify the required parameter 'filter' is set + if ($filter === null || (is_array($filter) && count($filter) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $filter when calling getCampaigns' + ); + } $resourcePath = '/api/campaigns/'; $formParams = []; @@ -5157,8 +7498,17 @@ public function getCampaignsRequest($fields_campaign = null, $fields_tag = null, // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fields_campaign, - 'fields[campaign]', // param base name + $filter, + 'filter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + true // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_campaign_message, + 'fields[campaign-message]', // param base name 'array', // openApiType 'form', // style false, // explode @@ -5166,8 +7516,8 @@ public function getCampaignsRequest($fields_campaign = null, $fields_tag = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $fields_tag, - 'fields[tag]', // param base name + $fields_campaign, + 'fields[campaign]', // param base name 'array', // openApiType 'form', // style false, // explode @@ -5175,11 +7525,11 @@ public function getCampaignsRequest($fields_campaign = null, $fields_tag = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $filter, - 'filter', // param base name - 'string', // openApiType + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType 'form', // style - true, // explode + false, // explode false // required ) ?? []); // query params @@ -5264,7 +7614,7 @@ public function getCampaignsRequest($fields_campaign = null, $fields_tag = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5646,7 +7996,7 @@ public function updateCampaignRequest($id, $campaign_partial_update_query, $apiK $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6028,7 +8378,7 @@ public function updateCampaignMessageRequest($id, $campaign_message_partial_upda $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6298,7 +8648,7 @@ public function updateCampaignSendJobRequest($id, $campaign_send_job_partial_upd $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/CatalogsApi.php b/lib/API/CatalogsApi.php index 35bf9d4..3010eca 100644 --- a/lib/API/CatalogsApi.php +++ b/lib/API/CatalogsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -116,6 +116,257 @@ public function getConfig() return $this->config; } + /** + * Operation createBackInStockSubscription + * + * Create Back In Stock Subscription + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQuery $server_bis_subscription_create_query server_bis_subscription_create_query (required) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function createBackInStockSubscription($server_bis_subscription_create_query, $apiKey = null) + { + $this->createBackInStockSubscriptionWithHttpInfo($server_bis_subscription_create_query, $apiKey); + } + + /** + * Operation createBackInStockSubscriptionWithHttpInfo + * + * Create Back In Stock Subscription + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQuery $server_bis_subscription_create_query (required) + * + * @throws \KlaviyoAPI\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function createBackInStockSubscriptionWithHttpInfo($server_bis_subscription_create_query, $apiKey = null) + { + $request = $this->createBackInStockSubscriptionRequest($server_bis_subscription_create_query, $apiKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\KlaviyoAPI\Model\GetCreateVariantsJobs400Response', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createBackInStockSubscriptionAsync + * + * Create Back In Stock Subscription + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQuery $server_bis_subscription_create_query (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createBackInStockSubscriptionAsync($server_bis_subscription_create_query, $apiKey = null) + { + return $this->createBackInStockSubscriptionAsyncWithHttpInfo($server_bis_subscription_create_query, $apiKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createBackInStockSubscriptionAsyncWithHttpInfo + * + * Create Back In Stock Subscription + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQuery $server_bis_subscription_create_query (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createBackInStockSubscriptionAsyncWithHttpInfo($server_bis_subscription_create_query, $apiKey = null) + { + $returnType = ''; + $request = $this->createBackInStockSubscriptionRequest($server_bis_subscription_create_query, $apiKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createBackInStockSubscription' + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQuery $server_bis_subscription_create_query (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createBackInStockSubscriptionRequest($server_bis_subscription_create_query, $apiKey = null) + { + // verify the required parameter 'server_bis_subscription_create_query' is set + if ($server_bis_subscription_create_query === null || (is_array($server_bis_subscription_create_query) && count($server_bis_subscription_create_query) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $server_bis_subscription_create_query when calling createBackInStockSubscription' + ); + } + + $resourcePath = '/api/back-in-stock-subscriptions/'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($server_bis_subscription_create_query)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($server_bis_subscription_create_query)); + } else { + $httpBody = $server_bis_subscription_create_query; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + if ($apiKey == null) { + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + } else { + $apiKey = 'Klaviyo-API-Key '.$apiKey; + } + + $headers['Authorization'] = $apiKey; + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $defaultHeaders['revision'] = ['2023-07-15']; + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation createCatalogCategory * @@ -462,7 +713,7 @@ public function createCatalogCategoryRequest($catalog_category_create_query, $ap $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -732,7 +983,7 @@ public function createCatalogCategoryRelationshipsItemsRequest($id, $catalog_cat $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1095,7 +1346,7 @@ public function createCatalogItemRequest($catalog_item_create_query, $apiKey = n $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1365,7 +1616,7 @@ public function createCatalogItemRelationshipsCategoriesRequest($id, $catalog_it $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1728,7 +1979,7 @@ public function createCatalogVariantRequest($catalog_variant_create_query, $apiK $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1981,7 +2232,7 @@ public function deleteCatalogCategoryRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2251,7 +2502,7 @@ public function deleteCatalogCategoryRelationshipsItemsRequest($id, $catalog_cat $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2504,7 +2755,7 @@ public function deleteCatalogItemRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2774,7 +3025,7 @@ public function deleteCatalogItemRelationshipsCategoriesRequest($id, $catalog_it $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3027,7 +3278,7 @@ public function deleteCatalogVariantRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3049,10 +3300,10 @@ public function deleteCatalogVariantRequest($id, $apiKey = null) * * Get Catalog Categories * - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3069,10 +3320,10 @@ public function getCatalogCategories($fields_catalog_category = null, $filter = * * Get Catalog Categories * - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3240,10 +3491,10 @@ public function getCatalogCategoriesWithHttpInfo($fields_catalog_category = null * * Get Catalog Categories * - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3263,10 +3514,10 @@ function ($response) { * * Get Catalog Categories * - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3320,10 +3571,10 @@ function ($exception) { /** * Create request for operation 'getCatalogCategories' * - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3429,7 +3680,7 @@ public function getCatalogCategoriesRequest($fields_catalog_category = null, $fi $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3452,7 +3703,7 @@ public function getCatalogCategoriesRequest($fields_catalog_category = null, $fi * Get Catalog Category * * @param string $id The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3470,7 +3721,7 @@ public function getCatalogCategory($id, $fields_catalog_category = null, $apiKey * Get Catalog Category * * @param string $id The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3639,7 +3890,7 @@ public function getCatalogCategoryWithHttpInfo($id, $fields_catalog_category = n * Get Catalog Category * * @param string $id The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3660,7 +3911,7 @@ function ($response) { * Get Catalog Category * * @param string $id The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3715,7 +3966,7 @@ function ($exception) { * Create request for operation 'getCatalogCategory' * * @param string $id The catalog category ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3808,7 +4059,7 @@ public function getCatalogCategoryRequest($id, $fields_catalog_category = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3831,12 +4082,12 @@ public function getCatalogCategoryRequest($id, $fields_catalog_category = null, * Get Catalog Category Items * * @param string $id (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3854,12 +4105,12 @@ public function getCatalogCategoryItems($id, $fields_catalog_item = null, $field * Get Catalog Category Items * * @param string $id (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4028,12 +4279,12 @@ public function getCatalogCategoryItemsWithHttpInfo($id, $fields_catalog_item = * Get Catalog Category Items * * @param string $id (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4054,12 +4305,12 @@ function ($response) { * Get Catalog Category Items * * @param string $id (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4114,12 +4365,12 @@ function ($exception) { * Create request for operation 'getCatalogCategoryItems' * * @param string $id (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4257,7 +4508,7 @@ public function getCatalogCategoryItemsRequest($id, $fields_catalog_item = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4280,7 +4531,7 @@ public function getCatalogCategoryItemsRequest($id, $fields_catalog_item = null, * Get Catalog Category Relationships Items * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4298,7 +4549,7 @@ public function getCatalogCategoryRelationshipsItems($id, $page_cursor = null, $ * Get Catalog Category Relationships Items * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4467,7 +4718,7 @@ public function getCatalogCategoryRelationshipsItemsWithHttpInfo($id, $page_curs * Get Catalog Category Relationships Items * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4488,7 +4739,7 @@ function ($response) { * Get Catalog Category Relationships Items * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4543,7 +4794,7 @@ function ($exception) { * Create request for operation 'getCatalogCategoryRelationshipsItems' * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4636,7 +4887,7 @@ public function getCatalogCategoryRelationshipsItemsRequest($id, $page_cursor = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4659,9 +4910,9 @@ public function getCatalogCategoryRelationshipsItemsRequest($id, $page_cursor = * Get Catalog Item * * @param string $id The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4679,9 +4930,9 @@ public function getCatalogItem($id, $fields_catalog_item = null, $fields_catalog * Get Catalog Item * * @param string $id The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4850,9 +5101,9 @@ public function getCatalogItemWithHttpInfo($id, $fields_catalog_item = null, $fi * Get Catalog Item * * @param string $id The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4873,9 +5124,9 @@ function ($response) { * Get Catalog Item * * @param string $id The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4930,9 +5181,9 @@ function ($exception) { * Create request for operation 'getCatalogItem' * * @param string $id The catalog item ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5043,7 +5294,7 @@ public function getCatalogItemRequest($id, $fields_catalog_item = null, $fields_ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5066,10 +5317,10 @@ public function getCatalogItemRequest($id, $fields_catalog_item = null, $fields_ * Get Catalog Item Categories * * @param string $id (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5087,10 +5338,10 @@ public function getCatalogItemCategories($id, $fields_catalog_category = null, $ * Get Catalog Item Categories * * @param string $id (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5259,10 +5510,10 @@ public function getCatalogItemCategoriesWithHttpInfo($id, $fields_catalog_catego * Get Catalog Item Categories * * @param string $id (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5283,10 +5534,10 @@ function ($response) { * Get Catalog Item Categories * * @param string $id (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5341,10 +5592,10 @@ function ($exception) { * Create request for operation 'getCatalogItemCategories' * * @param string $id (required) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`name`: `contains` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5464,7 +5715,7 @@ public function getCatalogItemCategoriesRequest($id, $fields_catalog_category = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5487,7 +5738,7 @@ public function getCatalogItemCategoriesRequest($id, $fields_catalog_category = * Get Catalog Item Relationships Categories * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5505,7 +5756,7 @@ public function getCatalogItemRelationshipsCategories($id, $page_cursor = null, * Get Catalog Item Relationships Categories * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5674,7 +5925,7 @@ public function getCatalogItemRelationshipsCategoriesWithHttpInfo($id, $page_cur * Get Catalog Item Relationships Categories * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5695,7 +5946,7 @@ function ($response) { * Get Catalog Item Relationships Categories * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5750,7 +6001,7 @@ function ($exception) { * Create request for operation 'getCatalogItemRelationshipsCategories' * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5843,7 +6094,7 @@ public function getCatalogItemRelationshipsCategoriesRequest($id, $page_cursor = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5866,10 +6117,10 @@ public function getCatalogItemRelationshipsCategoriesRequest($id, $page_cursor = * Get Catalog Item Variants * * @param string $id (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5887,10 +6138,10 @@ public function getCatalogItemVariants($id, $fields_catalog_variant = null, $fil * Get Catalog Item Variants * * @param string $id (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6059,10 +6310,10 @@ public function getCatalogItemVariantsWithHttpInfo($id, $fields_catalog_variant * Get Catalog Item Variants * * @param string $id (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6083,10 +6334,10 @@ function ($response) { * Get Catalog Item Variants * * @param string $id (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6141,10 +6392,10 @@ function ($exception) { * Create request for operation 'getCatalogItemVariants' * * @param string $id (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -6264,7 +6515,7 @@ public function getCatalogItemVariantsRequest($id, $fields_catalog_variant = nul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6286,12 +6537,12 @@ public function getCatalogItemVariantsRequest($id, $fields_catalog_variant = nul * * Get Catalog Items * - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6308,12 +6559,12 @@ public function getCatalogItems($fields_catalog_item = null, $fields_catalog_var * * Get Catalog Items * - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6481,12 +6732,12 @@ public function getCatalogItemsWithHttpInfo($fields_catalog_item = null, $fields * * Get Catalog Items * - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6506,12 +6757,12 @@ function ($response) { * * Get Catalog Items * - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6565,12 +6816,12 @@ function ($exception) { /** * Create request for operation 'getCatalogItems' * - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`category`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -6694,7 +6945,7 @@ public function getCatalogItemsRequest($fields_catalog_item = null, $fields_cata $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6717,7 +6968,7 @@ public function getCatalogItemsRequest($fields_catalog_item = null, $fields_cata * Get Catalog Variant * * @param string $id The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6735,7 +6986,7 @@ public function getCatalogVariant($id, $fields_catalog_variant = null, $apiKey = * Get Catalog Variant * * @param string $id The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6904,7 +7155,7 @@ public function getCatalogVariantWithHttpInfo($id, $fields_catalog_variant = nul * Get Catalog Variant * * @param string $id The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6925,7 +7176,7 @@ function ($response) { * Get Catalog Variant * * @param string $id The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6980,7 +7231,7 @@ function ($exception) { * Create request for operation 'getCatalogVariant' * * @param string $id The catalog variant ID is a compound ID (string), with format: `{integration}:::{catalog}:::{external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`. (required) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -7073,7 +7324,7 @@ public function getCatalogVariantRequest($id, $fields_catalog_variant = null, $a $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7095,10 +7346,10 @@ public function getCatalogVariantRequest($id, $fields_catalog_variant = null, $a * * Get Catalog Variants * - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7115,10 +7366,10 @@ public function getCatalogVariants($fields_catalog_variant = null, $filter = nul * * Get Catalog Variants * - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7286,10 +7537,10 @@ public function getCatalogVariantsWithHttpInfo($fields_catalog_variant = null, $ * * Get Catalog Variants * - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7309,10 +7560,10 @@ function ($response) { * * Get Catalog Variants * - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7366,10 +7617,10 @@ function ($exception) { /** * Create request for operation 'getCatalogVariants' * - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`ids`: `any`<br>`item`: `equals`<br>`sku`: `equals`<br>`title`: `contains`<br>`published`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -7475,7 +7726,7 @@ public function getCatalogVariantsRequest($fields_catalog_variant = null, $filte $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7498,9 +7749,9 @@ public function getCatalogVariantsRequest($fields_catalog_variant = null, $filte * Get Create Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7518,9 +7769,9 @@ public function getCreateCategoriesJob($job_id, $fields_catalog_category_bulk_cr * Get Create Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7689,9 +7940,9 @@ public function getCreateCategoriesJobWithHttpInfo($job_id, $fields_catalog_cate * Get Create Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7712,9 +7963,9 @@ function ($response) { * Get Create Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7769,9 +8020,9 @@ function ($exception) { * Create request for operation 'getCreateCategoriesJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -7882,7 +8133,7 @@ public function getCreateCategoriesJobRequest($job_id, $fields_catalog_category_ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7904,9 +8155,9 @@ public function getCreateCategoriesJobRequest($job_id, $fields_catalog_category_ * * Get Create Categories Jobs * - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7923,9 +8174,9 @@ public function getCreateCategoriesJobs($fields_catalog_category_bulk_create_job * * Get Create Categories Jobs * - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8093,9 +8344,9 @@ public function getCreateCategoriesJobsWithHttpInfo($fields_catalog_category_bul * * Get Create Categories Jobs * - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8115,9 +8366,9 @@ function ($response) { * * Get Create Categories Jobs * - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8171,9 +8422,9 @@ function ($exception) { /** * Create request for operation 'getCreateCategoriesJobs' * - * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -8270,7 +8521,7 @@ public function getCreateCategoriesJobsRequest($fields_catalog_category_bulk_cre $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -8293,9 +8544,9 @@ public function getCreateCategoriesJobsRequest($fields_catalog_category_bulk_cre * Get Create Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8313,9 +8564,9 @@ public function getCreateItemsJob($job_id, $fields_catalog_item_bulk_create_job * Get Create Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8484,9 +8735,9 @@ public function getCreateItemsJobWithHttpInfo($job_id, $fields_catalog_item_bulk * Get Create Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8507,9 +8758,9 @@ function ($response) { * Get Create Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8564,9 +8815,9 @@ function ($exception) { * Create request for operation 'getCreateItemsJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -8677,7 +8928,7 @@ public function getCreateItemsJobRequest($job_id, $fields_catalog_item_bulk_crea $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -8699,9 +8950,9 @@ public function getCreateItemsJobRequest($job_id, $fields_catalog_item_bulk_crea * * Get Create Items Jobs * - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8718,9 +8969,9 @@ public function getCreateItemsJobs($fields_catalog_item_bulk_create_job = null, * * Get Create Items Jobs * - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -8888,9 +9139,9 @@ public function getCreateItemsJobsWithHttpInfo($fields_catalog_item_bulk_create_ * * Get Create Items Jobs * - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8910,9 +9161,9 @@ function ($response) { * * Get Create Items Jobs * - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -8966,9 +9217,9 @@ function ($exception) { /** * Create request for operation 'getCreateItemsJobs' * - * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -9065,7 +9316,7 @@ public function getCreateItemsJobsRequest($fields_catalog_item_bulk_create_job = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -9088,9 +9339,9 @@ public function getCreateItemsJobsRequest($fields_catalog_item_bulk_create_job = * Get Create Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -9108,9 +9359,9 @@ public function getCreateVariantsJob($job_id, $fields_catalog_variant_bulk_creat * Get Create Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -9279,9 +9530,9 @@ public function getCreateVariantsJobWithHttpInfo($job_id, $fields_catalog_varian * Get Create Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -9302,9 +9553,9 @@ function ($response) { * Get Create Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -9359,9 +9610,9 @@ function ($exception) { * Create request for operation 'getCreateVariantsJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -9472,7 +9723,7 @@ public function getCreateVariantsJobRequest($job_id, $fields_catalog_variant_bul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -9494,9 +9745,9 @@ public function getCreateVariantsJobRequest($job_id, $fields_catalog_variant_bul * * Get Create Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -9513,9 +9764,9 @@ public function getCreateVariantsJobs($fields_catalog_variant_bulk_create_job = * * Get Create Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -9683,9 +9934,9 @@ public function getCreateVariantsJobsWithHttpInfo($fields_catalog_variant_bulk_c * * Get Create Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -9705,9 +9956,9 @@ function ($response) { * * Get Create Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -9761,9 +10012,9 @@ function ($exception) { /** * Create request for operation 'getCreateVariantsJobs' * - * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -9860,7 +10111,7 @@ public function getCreateVariantsJobsRequest($fields_catalog_variant_bulk_create $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -9883,7 +10134,7 @@ public function getCreateVariantsJobsRequest($fields_catalog_variant_bulk_create * Get Delete Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -9901,7 +10152,7 @@ public function getDeleteCategoriesJob($job_id, $fields_catalog_category_bulk_de * Get Delete Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -10070,7 +10321,7 @@ public function getDeleteCategoriesJobWithHttpInfo($job_id, $fields_catalog_cate * Get Delete Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -10091,7 +10342,7 @@ function ($response) { * Get Delete Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -10146,7 +10397,7 @@ function ($exception) { * Create request for operation 'getDeleteCategoriesJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -10239,7 +10490,7 @@ public function getDeleteCategoriesJobRequest($job_id, $fields_catalog_category_ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -10261,9 +10512,9 @@ public function getDeleteCategoriesJobRequest($job_id, $fields_catalog_category_ * * Get Delete Categories Jobs * - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -10280,9 +10531,9 @@ public function getDeleteCategoriesJobs($fields_catalog_category_bulk_delete_job * * Get Delete Categories Jobs * - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -10450,9 +10701,9 @@ public function getDeleteCategoriesJobsWithHttpInfo($fields_catalog_category_bul * * Get Delete Categories Jobs * - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -10472,9 +10723,9 @@ function ($response) { * * Get Delete Categories Jobs * - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -10528,9 +10779,9 @@ function ($exception) { /** * Create request for operation 'getDeleteCategoriesJobs' * - * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -10627,7 +10878,7 @@ public function getDeleteCategoriesJobsRequest($fields_catalog_category_bulk_del $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -10650,7 +10901,7 @@ public function getDeleteCategoriesJobsRequest($fields_catalog_category_bulk_del * Get Delete Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -10668,7 +10919,7 @@ public function getDeleteItemsJob($job_id, $fields_catalog_item_bulk_delete_job * Get Delete Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -10837,7 +11088,7 @@ public function getDeleteItemsJobWithHttpInfo($job_id, $fields_catalog_item_bulk * Get Delete Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -10858,7 +11109,7 @@ function ($response) { * Get Delete Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -10913,7 +11164,7 @@ function ($exception) { * Create request for operation 'getDeleteItemsJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -11006,7 +11257,7 @@ public function getDeleteItemsJobRequest($job_id, $fields_catalog_item_bulk_dele $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -11028,9 +11279,9 @@ public function getDeleteItemsJobRequest($job_id, $fields_catalog_item_bulk_dele * * Get Delete Items Jobs * - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -11047,9 +11298,9 @@ public function getDeleteItemsJobs($fields_catalog_item_bulk_delete_job = null, * * Get Delete Items Jobs * - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -11217,9 +11468,9 @@ public function getDeleteItemsJobsWithHttpInfo($fields_catalog_item_bulk_delete_ * * Get Delete Items Jobs * - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -11239,9 +11490,9 @@ function ($response) { * * Get Delete Items Jobs * - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -11295,9 +11546,9 @@ function ($exception) { /** * Create request for operation 'getDeleteItemsJobs' * - * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -11394,7 +11645,7 @@ public function getDeleteItemsJobsRequest($fields_catalog_item_bulk_delete_job = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -11417,7 +11668,7 @@ public function getDeleteItemsJobsRequest($fields_catalog_item_bulk_delete_job = * Get Delete Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -11435,7 +11686,7 @@ public function getDeleteVariantsJob($job_id, $fields_catalog_variant_bulk_delet * Get Delete Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -11604,7 +11855,7 @@ public function getDeleteVariantsJobWithHttpInfo($job_id, $fields_catalog_varian * Get Delete Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -11625,7 +11876,7 @@ function ($response) { * Get Delete Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -11680,7 +11931,7 @@ function ($exception) { * Create request for operation 'getDeleteVariantsJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -11773,7 +12024,7 @@ public function getDeleteVariantsJobRequest($job_id, $fields_catalog_variant_bul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -11795,9 +12046,9 @@ public function getDeleteVariantsJobRequest($job_id, $fields_catalog_variant_bul * * Get Delete Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -11814,9 +12065,9 @@ public function getDeleteVariantsJobs($fields_catalog_variant_bulk_delete_job = * * Get Delete Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -11984,9 +12235,9 @@ public function getDeleteVariantsJobsWithHttpInfo($fields_catalog_variant_bulk_d * * Get Delete Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -12006,9 +12257,9 @@ function ($response) { * * Get Delete Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -12062,9 +12313,9 @@ function ($exception) { /** * Create request for operation 'getDeleteVariantsJobs' * - * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -12161,7 +12412,7 @@ public function getDeleteVariantsJobsRequest($fields_catalog_variant_bulk_delete $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -12184,9 +12435,9 @@ public function getDeleteVariantsJobsRequest($fields_catalog_variant_bulk_delete * Get Update Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -12204,9 +12455,9 @@ public function getUpdateCategoriesJob($job_id, $fields_catalog_category_bulk_up * Get Update Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -12375,9 +12626,9 @@ public function getUpdateCategoriesJobWithHttpInfo($job_id, $fields_catalog_cate * Get Update Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -12398,9 +12649,9 @@ function ($response) { * Get Update Categories Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -12455,9 +12706,9 @@ function ($exception) { * Create request for operation 'getUpdateCategoriesJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -12568,7 +12819,7 @@ public function getUpdateCategoriesJobRequest($job_id, $fields_catalog_category_ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -12590,9 +12841,9 @@ public function getUpdateCategoriesJobRequest($job_id, $fields_catalog_category_ * * Get Update Categories Jobs * - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -12609,9 +12860,9 @@ public function getUpdateCategoriesJobs($fields_catalog_category_bulk_update_job * * Get Update Categories Jobs * - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -12779,9 +13030,9 @@ public function getUpdateCategoriesJobsWithHttpInfo($fields_catalog_category_bul * * Get Update Categories Jobs * - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -12801,9 +13052,9 @@ function ($response) { * * Get Update Categories Jobs * - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -12857,9 +13108,9 @@ function ($exception) { /** * Create request for operation 'getUpdateCategoriesJobs' * - * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -12956,7 +13207,7 @@ public function getUpdateCategoriesJobsRequest($fields_catalog_category_bulk_upd $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -12979,9 +13230,9 @@ public function getUpdateCategoriesJobsRequest($fields_catalog_category_bulk_upd * Get Update Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -12999,9 +13250,9 @@ public function getUpdateItemsJob($job_id, $fields_catalog_item_bulk_update_job * Get Update Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -13170,9 +13421,9 @@ public function getUpdateItemsJobWithHttpInfo($job_id, $fields_catalog_item_bulk * Get Update Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -13193,9 +13444,9 @@ function ($response) { * Get Update Items Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -13250,9 +13501,9 @@ function ($exception) { * Create request for operation 'getUpdateItemsJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -13363,7 +13614,7 @@ public function getUpdateItemsJobRequest($job_id, $fields_catalog_item_bulk_upda $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -13385,9 +13636,9 @@ public function getUpdateItemsJobRequest($job_id, $fields_catalog_item_bulk_upda * * Get Update Items Jobs * - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -13404,9 +13655,9 @@ public function getUpdateItemsJobs($fields_catalog_item_bulk_update_job = null, * * Get Update Items Jobs * - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -13574,9 +13825,9 @@ public function getUpdateItemsJobsWithHttpInfo($fields_catalog_item_bulk_update_ * * Get Update Items Jobs * - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -13596,9 +13847,9 @@ function ($response) { * * Get Update Items Jobs * - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -13652,9 +13903,9 @@ function ($exception) { /** * Create request for operation 'getUpdateItemsJobs' * - * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -13751,7 +14002,7 @@ public function getUpdateItemsJobsRequest($fields_catalog_item_bulk_update_job = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -13774,9 +14025,9 @@ public function getUpdateItemsJobsRequest($fields_catalog_item_bulk_update_job = * Get Update Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -13794,9 +14045,9 @@ public function getUpdateVariantsJob($job_id, $fields_catalog_variant_bulk_updat * Get Update Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -13965,9 +14216,9 @@ public function getUpdateVariantsJobWithHttpInfo($job_id, $fields_catalog_varian * Get Update Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -13988,9 +14239,9 @@ function ($response) { * Get Update Variants Job * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -14045,9 +14296,9 @@ function ($exception) { * Create request for operation 'getUpdateVariantsJob' * * @param string $job_id ID of the job to retrieve. (required) - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -14158,7 +14409,7 @@ public function getUpdateVariantsJobRequest($job_id, $fields_catalog_variant_bul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -14180,9 +14431,9 @@ public function getUpdateVariantsJobRequest($job_id, $fields_catalog_variant_bul * * Get Update Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -14199,9 +14450,9 @@ public function getUpdateVariantsJobs($fields_catalog_variant_bulk_update_job = * * Get Update Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -14369,9 +14620,9 @@ public function getUpdateVariantsJobsWithHttpInfo($fields_catalog_variant_bulk_u * * Get Update Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -14391,9 +14642,9 @@ function ($response) { * * Get Update Variants Jobs * - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -14447,9 +14698,9 @@ function ($exception) { /** * Create request for operation 'getUpdateVariantsJobs' * - * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -14546,7 +14797,7 @@ public function getUpdateVariantsJobsRequest($fields_catalog_variant_bulk_update $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -14909,7 +15160,7 @@ public function spawnCreateCategoriesJobRequest($catalog_category_create_job_cre $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -15272,7 +15523,7 @@ public function spawnCreateItemsJobRequest($catalog_item_create_job_create_query $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -15635,7 +15886,7 @@ public function spawnCreateVariantsJobRequest($catalog_variant_create_job_create $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -15998,7 +16249,7 @@ public function spawnDeleteCategoriesJobRequest($catalog_category_delete_job_cre $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -16361,7 +16612,7 @@ public function spawnDeleteItemsJobRequest($catalog_item_delete_job_create_query $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -16724,7 +16975,7 @@ public function spawnDeleteVariantsJobRequest($catalog_variant_delete_job_create $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -17087,7 +17338,7 @@ public function spawnUpdateCategoriesJobRequest($catalog_category_update_job_cre $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -17450,7 +17701,7 @@ public function spawnUpdateItemsJobRequest($catalog_item_update_job_create_query $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -17813,7 +18064,7 @@ public function spawnUpdateVariantsJobRequest($catalog_variant_update_job_create $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -18195,7 +18446,7 @@ public function updateCatalogCategoryRequest($id, $catalog_category_update_query $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -18465,7 +18716,7 @@ public function updateCatalogCategoryRelationshipsItemsRequest($id, $catalog_cat $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -18847,7 +19098,7 @@ public function updateCatalogItemRequest($id, $catalog_item_update_query, $apiKe $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -19117,7 +19368,7 @@ public function updateCatalogItemRelationshipsCategoriesRequest($id, $catalog_it $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -19499,7 +19750,7 @@ public function updateCatalogVariantRequest($id, $catalog_variant_update_query, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/DataPrivacyApi.php b/lib/API/DataPrivacyApi.php index d1f9121..8ff1fd4 100644 --- a/lib/API/DataPrivacyApi.php +++ b/lib/API/DataPrivacyApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -350,7 +350,7 @@ public function requestProfileDeletionRequest($data_privacy_create_deletion_job_ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/EventsApi.php b/lib/API/EventsApi.php index 5ff101a..2c098d3 100644 --- a/lib/API/EventsApi.php +++ b/lib/API/EventsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -121,15 +121,15 @@ public function getConfig() * * Create Event * - * @param \KlaviyoAPI\Model\EventCreateQuery $event_create_query Event to create. (required) + * @param \KlaviyoAPI\Model\EventCreateQueryV2 $event_create_query_v2 event_create_query_v2 (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function createEvent($event_create_query, $apiKey = null) + public function createEvent($event_create_query_v2, $apiKey = null) { - $this->createEventWithHttpInfo($event_create_query, $apiKey); + $this->createEventWithHttpInfo($event_create_query_v2, $apiKey); } /** @@ -137,15 +137,15 @@ public function createEvent($event_create_query, $apiKey = null) * * Create Event * - * @param \KlaviyoAPI\Model\EventCreateQuery $event_create_query Event to create. (required) + * @param \KlaviyoAPI\Model\EventCreateQueryV2 $event_create_query_v2 (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createEventWithHttpInfo($event_create_query, $apiKey = null) + public function createEventWithHttpInfo($event_create_query_v2, $apiKey = null) { - $request = $this->createEventRequest($event_create_query, $apiKey); + $request = $this->createEventRequest($event_create_query_v2, $apiKey); try { $options = $this->createHttpClientOption(); @@ -212,14 +212,14 @@ public function createEventWithHttpInfo($event_create_query, $apiKey = null) * * Create Event * - * @param \KlaviyoAPI\Model\EventCreateQuery $event_create_query Event to create. (required) + * @param \KlaviyoAPI\Model\EventCreateQueryV2 $event_create_query_v2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createEventAsync($event_create_query, $apiKey = null) + public function createEventAsync($event_create_query_v2, $apiKey = null) { - return $this->createEventAsyncWithHttpInfo($event_create_query, $apiKey) + return $this->createEventAsyncWithHttpInfo($event_create_query_v2, $apiKey) ->then( function ($response) { return $response[0]; @@ -232,15 +232,15 @@ function ($response) { * * Create Event * - * @param \KlaviyoAPI\Model\EventCreateQuery $event_create_query Event to create. (required) + * @param \KlaviyoAPI\Model\EventCreateQueryV2 $event_create_query_v2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createEventAsyncWithHttpInfo($event_create_query, $apiKey = null) + public function createEventAsyncWithHttpInfo($event_create_query_v2, $apiKey = null) { $returnType = ''; - $request = $this->createEventRequest($event_create_query, $apiKey); + $request = $this->createEventRequest($event_create_query_v2, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -268,17 +268,17 @@ function ($exception) { /** * Create request for operation 'createEvent' * - * @param \KlaviyoAPI\Model\EventCreateQuery $event_create_query Event to create. (required) + * @param \KlaviyoAPI\Model\EventCreateQueryV2 $event_create_query_v2 (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createEventRequest($event_create_query, $apiKey = null) + public function createEventRequest($event_create_query_v2, $apiKey = null) { - // verify the required parameter 'event_create_query' is set - if ($event_create_query === null || (is_array($event_create_query) && count($event_create_query) === 0)) { + // verify the required parameter 'event_create_query_v2' is set + if ($event_create_query_v2 === null || (is_array($event_create_query_v2) && count($event_create_query_v2) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_create_query when calling createEvent' + 'Missing the required parameter $event_create_query_v2 when calling createEvent' ); } @@ -305,11 +305,11 @@ public function createEventRequest($event_create_query, $apiKey = null) } // for model (json/xml) - if (isset($event_create_query)) { + if (isset($event_create_query_v2)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($event_create_query)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($event_create_query_v2)); } else { - $httpBody = $event_create_query; + $httpBody = $event_create_query_v2; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -350,7 +350,7 @@ public function createEventRequest($event_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -373,10 +373,10 @@ public function createEventRequest($event_create_query, $apiKey = null) * Get Event * * @param string $id ID of the event (required) - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -394,10 +394,10 @@ public function getEvent($id, $fields_event = null, $fields_metric = null, $fiel * Get Event * * @param string $id ID of the event (required) - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -566,10 +566,10 @@ public function getEventWithHttpInfo($id, $fields_event = null, $fields_metric = * Get Event * * @param string $id ID of the event (required) - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -590,10 +590,10 @@ function ($response) { * Get Event * * @param string $id ID of the event (required) - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -648,10 +648,10 @@ function ($exception) { * Create request for operation 'getEvent' * * @param string $id ID of the event (required) - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -771,7 +771,7 @@ public function getEventRequest($id, $fields_event = null, $fields_metric = null $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -789,38 +789,38 @@ public function getEventRequest($id, $fields_event = null, $fields_metric = null } /** - * Operation getEventMetrics + * Operation getEventMetric * - * Get Event Metrics + * Get Event Metric * * @param string $id (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getEventMetrics($id, $fields_metric = null, $apiKey = null) + public function getEventMetric($id, $fields_metric = null, $apiKey = null) { - list($response) = $this->getEventMetricsWithHttpInfo($id, $fields_metric, $apiKey); + list($response) = $this->getEventMetricWithHttpInfo($id, $fields_metric, $apiKey); return $response; } /** - * Operation getEventMetricsWithHttpInfo + * Operation getEventMetricWithHttpInfo * - * Get Event Metrics + * Get Event Metric * * @param string $id (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getEventMetricsWithHttpInfo($id, $fields_metric = null, $apiKey = null) + public function getEventMetricWithHttpInfo($id, $fields_metric = null, $apiKey = null) { - $request = $this->getEventMetricsRequest($id, $fields_metric, $apiKey); + $request = $this->getEventMetricRequest($id, $fields_metric, $apiKey); try { $options = $this->createHttpClientOption(); @@ -976,19 +976,19 @@ public function getEventMetricsWithHttpInfo($id, $fields_metric = null, $apiKey } /** - * Operation getEventMetricsAsync + * Operation getEventMetricAsync * - * Get Event Metrics + * Get Event Metric * * @param string $id (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventMetricsAsync($id, $fields_metric = null, $apiKey = null) + public function getEventMetricAsync($id, $fields_metric = null, $apiKey = null) { - return $this->getEventMetricsAsyncWithHttpInfo($id, $fields_metric, $apiKey) + return $this->getEventMetricAsyncWithHttpInfo($id, $fields_metric, $apiKey) ->then( function ($response) { return $response[0]; @@ -997,20 +997,20 @@ function ($response) { } /** - * Operation getEventMetricsAsyncWithHttpInfo + * Operation getEventMetricAsyncWithHttpInfo * - * Get Event Metrics + * Get Event Metric * * @param string $id (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventMetricsAsyncWithHttpInfo($id, $fields_metric = null, $apiKey = null) + public function getEventMetricAsyncWithHttpInfo($id, $fields_metric = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getEventMetricsRequest($id, $fields_metric, $apiKey); + $request = $this->getEventMetricRequest($id, $fields_metric, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1054,24 +1054,24 @@ function ($exception) { } /** - * Create request for operation 'getEventMetrics' + * Create request for operation 'getEventMetric' * * @param string $id (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventMetricsRequest($id, $fields_metric = null, $apiKey = null) + public function getEventMetricRequest($id, $fields_metric = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getEventMetrics' + 'Missing the required parameter $id when calling getEventMetric' ); } - $resourcePath = '/api/events/{id}/metrics/'; + $resourcePath = '/api/events/{id}/metric/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1150,7 +1150,7 @@ public function getEventMetricsRequest($id, $fields_metric = null, $apiKey = nul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1168,40 +1168,40 @@ public function getEventMetricsRequest($id, $fields_metric = null, $apiKey = nul } /** - * Operation getEventProfiles + * Operation getEventProfile * - * Get Event Profiles + * Get Event Profile * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getEventProfiles($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) + public function getEventProfile($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) { - list($response) = $this->getEventProfilesWithHttpInfo($id, $additional_fields_profile, $fields_profile, $apiKey); + list($response) = $this->getEventProfileWithHttpInfo($id, $additional_fields_profile, $fields_profile, $apiKey); return $response; } /** - * Operation getEventProfilesWithHttpInfo + * Operation getEventProfileWithHttpInfo * - * Get Event Profiles + * Get Event Profile * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getEventProfilesWithHttpInfo($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) + public function getEventProfileWithHttpInfo($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) { - $request = $this->getEventProfilesRequest($id, $additional_fields_profile, $fields_profile, $apiKey); + $request = $this->getEventProfileRequest($id, $additional_fields_profile, $fields_profile, $apiKey); try { $options = $this->createHttpClientOption(); @@ -1357,20 +1357,20 @@ public function getEventProfilesWithHttpInfo($id, $additional_fields_profile = n } /** - * Operation getEventProfilesAsync + * Operation getEventProfileAsync * - * Get Event Profiles + * Get Event Profile * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventProfilesAsync($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) + public function getEventProfileAsync($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) { - return $this->getEventProfilesAsyncWithHttpInfo($id, $additional_fields_profile, $fields_profile, $apiKey) + return $this->getEventProfileAsyncWithHttpInfo($id, $additional_fields_profile, $fields_profile, $apiKey) ->then( function ($response) { return $response[0]; @@ -1379,21 +1379,21 @@ function ($response) { } /** - * Operation getEventProfilesAsyncWithHttpInfo + * Operation getEventProfileAsyncWithHttpInfo * - * Get Event Profiles + * Get Event Profile * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventProfilesAsyncWithHttpInfo($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) + public function getEventProfileAsyncWithHttpInfo($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getEventProfilesRequest($id, $additional_fields_profile, $fields_profile, $apiKey); + $request = $this->getEventProfileRequest($id, $additional_fields_profile, $fields_profile, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1437,25 +1437,25 @@ function ($exception) { } /** - * Create request for operation 'getEventProfiles' + * Create request for operation 'getEventProfile' * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventProfilesRequest($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) + public function getEventProfileRequest($id, $additional_fields_profile = null, $fields_profile = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getEventProfiles' + 'Missing the required parameter $id when calling getEventProfile' ); } - $resourcePath = '/api/events/{id}/profiles/'; + $resourcePath = '/api/events/{id}/profile/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1543,7 +1543,7 @@ public function getEventProfilesRequest($id, $additional_fields_profile = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1561,9 +1561,9 @@ public function getEventProfilesRequest($id, $additional_fields_profile = null, } /** - * Operation getEventRelationshipsMetrics + * Operation getEventRelationshipsMetric * - * Get Event Relationships Metrics + * Get Event Relationships Metric * * @param string $id (required) * @@ -1571,16 +1571,16 @@ public function getEventProfilesRequest($id, $additional_fields_profile = null, * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getEventRelationshipsMetrics($id, $apiKey = null) + public function getEventRelationshipsMetric($id, $apiKey = null) { - list($response) = $this->getEventRelationshipsMetricsWithHttpInfo($id, $apiKey); + list($response) = $this->getEventRelationshipsMetricWithHttpInfo($id, $apiKey); return $response; } /** - * Operation getEventRelationshipsMetricsWithHttpInfo + * Operation getEventRelationshipsMetricWithHttpInfo * - * Get Event Relationships Metrics + * Get Event Relationships Metric * * @param string $id (required) * @@ -1588,9 +1588,9 @@ public function getEventRelationshipsMetrics($id, $apiKey = null) * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getEventRelationshipsMetricsWithHttpInfo($id, $apiKey = null) + public function getEventRelationshipsMetricWithHttpInfo($id, $apiKey = null) { - $request = $this->getEventRelationshipsMetricsRequest($id, $apiKey); + $request = $this->getEventRelationshipsMetricRequest($id, $apiKey); try { $options = $this->createHttpClientOption(); @@ -1746,18 +1746,18 @@ public function getEventRelationshipsMetricsWithHttpInfo($id, $apiKey = null) } /** - * Operation getEventRelationshipsMetricsAsync + * Operation getEventRelationshipsMetricAsync * - * Get Event Relationships Metrics + * Get Event Relationships Metric * * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventRelationshipsMetricsAsync($id, $apiKey = null) + public function getEventRelationshipsMetricAsync($id, $apiKey = null) { - return $this->getEventRelationshipsMetricsAsyncWithHttpInfo($id, $apiKey) + return $this->getEventRelationshipsMetricAsyncWithHttpInfo($id, $apiKey) ->then( function ($response) { return $response[0]; @@ -1766,19 +1766,19 @@ function ($response) { } /** - * Operation getEventRelationshipsMetricsAsyncWithHttpInfo + * Operation getEventRelationshipsMetricAsyncWithHttpInfo * - * Get Event Relationships Metrics + * Get Event Relationships Metric * * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventRelationshipsMetricsAsyncWithHttpInfo($id, $apiKey = null) + public function getEventRelationshipsMetricAsyncWithHttpInfo($id, $apiKey = null) { $returnType = 'array'; - $request = $this->getEventRelationshipsMetricsRequest($id, $apiKey); + $request = $this->getEventRelationshipsMetricRequest($id, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1822,23 +1822,23 @@ function ($exception) { } /** - * Create request for operation 'getEventRelationshipsMetrics' + * Create request for operation 'getEventRelationshipsMetric' * * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventRelationshipsMetricsRequest($id, $apiKey = null) + public function getEventRelationshipsMetricRequest($id, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getEventRelationshipsMetrics' + 'Missing the required parameter $id when calling getEventRelationshipsMetric' ); } - $resourcePath = '/api/events/{id}/relationships/metrics/'; + $resourcePath = '/api/events/{id}/relationships/metric/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1908,7 +1908,7 @@ public function getEventRelationshipsMetricsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1926,9 +1926,9 @@ public function getEventRelationshipsMetricsRequest($id, $apiKey = null) } /** - * Operation getEventRelationshipsProfiles + * Operation getEventRelationshipsProfile * - * Get Event Relationships Profiles + * Get Event Relationships Profile * * @param string $id (required) * @@ -1936,16 +1936,16 @@ public function getEventRelationshipsMetricsRequest($id, $apiKey = null) * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getEventRelationshipsProfiles($id, $apiKey = null) + public function getEventRelationshipsProfile($id, $apiKey = null) { - list($response) = $this->getEventRelationshipsProfilesWithHttpInfo($id, $apiKey); + list($response) = $this->getEventRelationshipsProfileWithHttpInfo($id, $apiKey); return $response; } /** - * Operation getEventRelationshipsProfilesWithHttpInfo + * Operation getEventRelationshipsProfileWithHttpInfo * - * Get Event Relationships Profiles + * Get Event Relationships Profile * * @param string $id (required) * @@ -1953,9 +1953,9 @@ public function getEventRelationshipsProfiles($id, $apiKey = null) * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getEventRelationshipsProfilesWithHttpInfo($id, $apiKey = null) + public function getEventRelationshipsProfileWithHttpInfo($id, $apiKey = null) { - $request = $this->getEventRelationshipsProfilesRequest($id, $apiKey); + $request = $this->getEventRelationshipsProfileRequest($id, $apiKey); try { $options = $this->createHttpClientOption(); @@ -2111,18 +2111,18 @@ public function getEventRelationshipsProfilesWithHttpInfo($id, $apiKey = null) } /** - * Operation getEventRelationshipsProfilesAsync + * Operation getEventRelationshipsProfileAsync * - * Get Event Relationships Profiles + * Get Event Relationships Profile * * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventRelationshipsProfilesAsync($id, $apiKey = null) + public function getEventRelationshipsProfileAsync($id, $apiKey = null) { - return $this->getEventRelationshipsProfilesAsyncWithHttpInfo($id, $apiKey) + return $this->getEventRelationshipsProfileAsyncWithHttpInfo($id, $apiKey) ->then( function ($response) { return $response[0]; @@ -2131,19 +2131,19 @@ function ($response) { } /** - * Operation getEventRelationshipsProfilesAsyncWithHttpInfo + * Operation getEventRelationshipsProfileAsyncWithHttpInfo * - * Get Event Relationships Profiles + * Get Event Relationships Profile * * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventRelationshipsProfilesAsyncWithHttpInfo($id, $apiKey = null) + public function getEventRelationshipsProfileAsyncWithHttpInfo($id, $apiKey = null) { $returnType = 'array'; - $request = $this->getEventRelationshipsProfilesRequest($id, $apiKey); + $request = $this->getEventRelationshipsProfileRequest($id, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2187,23 +2187,23 @@ function ($exception) { } /** - * Create request for operation 'getEventRelationshipsProfiles' + * Create request for operation 'getEventRelationshipsProfile' * * @param string $id (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEventRelationshipsProfilesRequest($id, $apiKey = null) + public function getEventRelationshipsProfileRequest($id, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getEventRelationshipsProfiles' + 'Missing the required parameter $id when calling getEventRelationshipsProfile' ); } - $resourcePath = '/api/events/{id}/relationships/profiles/'; + $resourcePath = '/api/events/{id}/relationships/profile/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2273,7 +2273,7 @@ public function getEventRelationshipsProfilesRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2295,13 +2295,13 @@ public function getEventRelationshipsProfilesRequest($id, $apiKey = null) * * Get Events * - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2318,13 +2318,13 @@ public function getEvents($fields_event = null, $fields_metric = null, $fields_p * * Get Events * - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2492,13 +2492,13 @@ public function getEventsWithHttpInfo($fields_event = null, $fields_metric = nul * * Get Events * - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2518,13 +2518,13 @@ function ($response) { * * Get Events * - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2578,13 +2578,13 @@ function ($exception) { /** * Create request for operation 'getEvents' * - * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_event For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`metric_id`: `equals`<br>`profile_id`: `equals`<br>`datetime`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`timestamp`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2717,7 +2717,7 @@ public function getEventsRequest($fields_event = null, $fields_metric = null, $f $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/FlowsApi.php b/lib/API/FlowsApi.php index 5b63d0e..66a2b43 100644 --- a/lib/API/FlowsApi.php +++ b/lib/API/FlowsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -122,17 +122,18 @@ public function getConfig() * Get Flow * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getFlow($id, $fields_flow_action = null, $fields_flow = null, $include = null, $apiKey = null) + public function getFlow($id, $fields_flow_action = null, $fields_flow = null, $fields_tag = null, $include = null, $apiKey = null) { - list($response) = $this->getFlowWithHttpInfo($id, $fields_flow_action, $fields_flow, $include, $apiKey); + list($response) = $this->getFlowWithHttpInfo($id, $fields_flow_action, $fields_flow, $fields_tag, $include, $apiKey); return $response; } @@ -142,17 +143,18 @@ public function getFlow($id, $fields_flow_action = null, $fields_flow = null, $i * Get Flow * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getFlowWithHttpInfo($id, $fields_flow_action = null, $fields_flow = null, $include = null, $apiKey = null) + public function getFlowWithHttpInfo($id, $fields_flow_action = null, $fields_flow = null, $fields_tag = null, $include = null, $apiKey = null) { - $request = $this->getFlowRequest($id, $fields_flow_action, $fields_flow, $include, $apiKey); + $request = $this->getFlowRequest($id, $fields_flow_action, $fields_flow, $fields_tag, $include, $apiKey); try { $options = $this->createHttpClientOption(); @@ -313,16 +315,17 @@ public function getFlowWithHttpInfo($id, $fields_flow_action = null, $fields_flo * Get Flow * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFlowAsync($id, $fields_flow_action = null, $fields_flow = null, $include = null, $apiKey = null) + public function getFlowAsync($id, $fields_flow_action = null, $fields_flow = null, $fields_tag = null, $include = null, $apiKey = null) { - return $this->getFlowAsyncWithHttpInfo($id, $fields_flow_action, $fields_flow, $include, $apiKey) + return $this->getFlowAsyncWithHttpInfo($id, $fields_flow_action, $fields_flow, $fields_tag, $include, $apiKey) ->then( function ($response) { return $response[0]; @@ -336,17 +339,18 @@ function ($response) { * Get Flow * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFlowAsyncWithHttpInfo($id, $fields_flow_action = null, $fields_flow = null, $include = null, $apiKey = null) + public function getFlowAsyncWithHttpInfo($id, $fields_flow_action = null, $fields_flow = null, $fields_tag = null, $include = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getFlowRequest($id, $fields_flow_action, $fields_flow, $include, $apiKey); + $request = $this->getFlowRequest($id, $fields_flow_action, $fields_flow, $fields_tag, $include, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -393,14 +397,15 @@ function ($exception) { * Create request for operation 'getFlow' * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFlowRequest($id, $fields_flow_action = null, $fields_flow = null, $include = null, $apiKey = null) + public function getFlowRequest($id, $fields_flow_action = null, $fields_flow = null, $fields_tag = null, $include = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -435,6 +440,15 @@ public function getFlowRequest($id, $fields_flow_action = null, $fields_flow = n false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $include, 'include', // param base name @@ -506,7 +520,7 @@ public function getFlowRequest($id, $fields_flow_action = null, $fields_flow = n $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -529,10 +543,10 @@ public function getFlowRequest($id, $fields_flow_action = null, $fields_flow = n * Get Flow Action * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -550,10 +564,10 @@ public function getFlowAction($id, $fields_flow_action = null, $fields_flow_mess * Get Flow Action * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -722,10 +736,10 @@ public function getFlowActionWithHttpInfo($id, $fields_flow_action = null, $fiel * Get Flow Action * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -746,10 +760,10 @@ function ($response) { * Get Flow Action * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -804,10 +818,10 @@ function ($exception) { * Create request for operation 'getFlowAction' * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -927,7 +941,7 @@ public function getFlowActionRequest($id, $fields_flow_action = null, $fields_fl $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -950,7 +964,7 @@ public function getFlowActionRequest($id, $fields_flow_action = null, $fields_fl * Get Flow For Flow Action * * @param string $id (required) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -968,7 +982,7 @@ public function getFlowActionFlow($id, $fields_flow = null, $apiKey = null) * Get Flow For Flow Action * * @param string $id (required) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1137,7 +1151,7 @@ public function getFlowActionFlowWithHttpInfo($id, $fields_flow = null, $apiKey * Get Flow For Flow Action * * @param string $id (required) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1158,7 +1172,7 @@ function ($response) { * Get Flow For Flow Action * * @param string $id (required) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1213,7 +1227,7 @@ function ($exception) { * Create request for operation 'getFlowActionFlow' * * @param string $id (required) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1306,7 +1320,7 @@ public function getFlowActionFlowRequest($id, $fields_flow = null, $apiKey = nul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1326,44 +1340,42 @@ public function getFlowActionFlowRequest($id, $fields_flow = null, $apiKey = nul /** * Operation getFlowActionMessages * - * Get Messages For Flow Action + * Get Flow Action Messages * * @param string $id (required) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getFlowActionMessages($id, $fields_flow_message = null, $filter = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowActionMessages($id, $fields_flow_message = null, $filter = null, $page_size = 50, $sort = null, $apiKey = null) { - list($response) = $this->getFlowActionMessagesWithHttpInfo($id, $fields_flow_message, $filter, $page_cursor, $page_size, $sort, $apiKey); + list($response) = $this->getFlowActionMessagesWithHttpInfo($id, $fields_flow_message, $filter, $page_size, $sort, $apiKey); return $response; } /** * Operation getFlowActionMessagesWithHttpInfo * - * Get Messages For Flow Action + * Get Flow Action Messages * * @param string $id (required) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getFlowActionMessagesWithHttpInfo($id, $fields_flow_message = null, $filter = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowActionMessagesWithHttpInfo($id, $fields_flow_message = null, $filter = null, $page_size = 50, $sort = null, $apiKey = null) { - $request = $this->getFlowActionMessagesRequest($id, $fields_flow_message, $filter, $page_cursor, $page_size, $sort, $apiKey); + $request = $this->getFlowActionMessagesRequest($id, $fields_flow_message, $filter, $page_size, $sort, $apiKey); try { $options = $this->createHttpClientOption(); @@ -1521,21 +1533,20 @@ public function getFlowActionMessagesWithHttpInfo($id, $fields_flow_message = nu /** * Operation getFlowActionMessagesAsync * - * Get Messages For Flow Action + * Get Flow Action Messages * * @param string $id (required) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFlowActionMessagesAsync($id, $fields_flow_message = null, $filter = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowActionMessagesAsync($id, $fields_flow_message = null, $filter = null, $page_size = 50, $sort = null, $apiKey = null) { - return $this->getFlowActionMessagesAsyncWithHttpInfo($id, $fields_flow_message, $filter, $page_cursor, $page_size, $sort, $apiKey) + return $this->getFlowActionMessagesAsyncWithHttpInfo($id, $fields_flow_message, $filter, $page_size, $sort, $apiKey) ->then( function ($response) { return $response[0]; @@ -1546,22 +1557,21 @@ function ($response) { /** * Operation getFlowActionMessagesAsyncWithHttpInfo * - * Get Messages For Flow Action + * Get Flow Action Messages * * @param string $id (required) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFlowActionMessagesAsyncWithHttpInfo($id, $fields_flow_message = null, $filter = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowActionMessagesAsyncWithHttpInfo($id, $fields_flow_message = null, $filter = null, $page_size = 50, $sort = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getFlowActionMessagesRequest($id, $fields_flow_message, $filter, $page_cursor, $page_size, $sort, $apiKey); + $request = $this->getFlowActionMessagesRequest($id, $fields_flow_message, $filter, $page_size, $sort, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1608,16 +1618,15 @@ function ($exception) { * Create request for operation 'getFlowActionMessages' * * @param string $id (required) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFlowActionMessagesRequest($id, $fields_flow_message = null, $filter = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowActionMessagesRequest($id, $fields_flow_message = null, $filter = null, $page_size = 50, $sort = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -1625,8 +1634,8 @@ public function getFlowActionMessagesRequest($id, $fields_flow_message = null, $ 'Missing the required parameter $id when calling getFlowActionMessages' ); } - if ($page_size !== null && $page_size > 50) { - throw new \InvalidArgumentException('invalid value for "$page_size" when calling FlowsApi.getFlowActionMessages, must be smaller than or equal to 50.'); + if ($page_size !== null && $page_size > 100) { + throw new \InvalidArgumentException('invalid value for "$page_size" when calling FlowsApi.getFlowActionMessages, must be smaller than or equal to 100.'); } if ($page_size !== null && $page_size < 1) { throw new \InvalidArgumentException('invalid value for "$page_size" when calling FlowsApi.getFlowActionMessages, must be bigger than or equal to 1.'); @@ -1659,15 +1668,6 @@ public function getFlowActionMessagesRequest($id, $fields_flow_message = null, $ false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $page_cursor, - 'page[cursor]', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $page_size, 'page[size]', // param base name @@ -1748,7 +1748,7 @@ public function getFlowActionMessagesRequest($id, $fields_flow_message = null, $ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2113,7 +2113,7 @@ public function getFlowActionRelationshipsFlowRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2136,10 +2136,10 @@ public function getFlowActionRelationshipsFlowRequest($id, $apiKey = null) * Get Flow Action Relationships Messages * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2157,10 +2157,10 @@ public function getFlowActionRelationshipsMessages($id, $filter = null, $page_cu * Get Flow Action Relationships Messages * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2329,10 +2329,10 @@ public function getFlowActionRelationshipsMessagesWithHttpInfo($id, $filter = nu * Get Flow Action Relationships Messages * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2353,10 +2353,10 @@ function ($response) { * Get Flow Action Relationships Messages * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2411,10 +2411,10 @@ function ($exception) { * Create request for operation 'getFlowActionRelationshipsMessages' * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2541,7 +2541,7 @@ public function getFlowActionRelationshipsMessagesRequest($id, $filter = null, $ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2561,14 +2561,14 @@ public function getFlowActionRelationshipsMessagesRequest($id, $filter = null, $ /** * Operation getFlowFlowActions * - * Get Flow Actions For Flow + * Get Flow Flow Actions * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2583,14 +2583,14 @@ public function getFlowFlowActions($id, $fields_flow_action = null, $filter = nu /** * Operation getFlowFlowActionsWithHttpInfo * - * Get Flow Actions For Flow + * Get Flow Flow Actions * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2756,14 +2756,14 @@ public function getFlowFlowActionsWithHttpInfo($id, $fields_flow_action = null, /** * Operation getFlowFlowActionsAsync * - * Get Flow Actions For Flow + * Get Flow Flow Actions * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2781,14 +2781,14 @@ function ($response) { /** * Operation getFlowFlowActionsAsyncWithHttpInfo * - * Get Flow Actions For Flow + * Get Flow Flow Actions * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2843,11 +2843,11 @@ function ($exception) { * Create request for operation 'getFlowFlowActions' * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`action_type`: `any`, `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2983,7 +2983,7 @@ public function getFlowFlowActionsRequest($id, $fields_flow_action = null, $filt $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3006,9 +3006,9 @@ public function getFlowFlowActionsRequest($id, $fields_flow_action = null, $filt * Get Flow Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3026,9 +3026,9 @@ public function getFlowMessage($id, $fields_flow_action = null, $fields_flow_mes * Get Flow Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3197,9 +3197,9 @@ public function getFlowMessageWithHttpInfo($id, $fields_flow_action = null, $fie * Get Flow Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3220,9 +3220,9 @@ function ($response) { * Get Flow Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3277,9 +3277,9 @@ function ($exception) { * Create request for operation 'getFlowMessage' * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_message For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3390,7 +3390,7 @@ public function getFlowMessageRequest($id, $fields_flow_action = null, $fields_f $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3413,7 +3413,7 @@ public function getFlowMessageRequest($id, $fields_flow_action = null, $fields_f * Get Flow Action For Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3431,7 +3431,7 @@ public function getFlowMessageAction($id, $fields_flow_action = null, $apiKey = * Get Flow Action For Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3600,7 +3600,7 @@ public function getFlowMessageActionWithHttpInfo($id, $fields_flow_action = null * Get Flow Action For Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3621,7 +3621,7 @@ function ($response) { * Get Flow Action For Message * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3676,7 +3676,7 @@ function ($exception) { * Create request for operation 'getFlowMessageAction' * * @param string $id (required) - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3769,7 +3769,7 @@ public function getFlowMessageActionRequest($id, $fields_flow_action = null, $ap $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4134,7 +4134,7 @@ public function getFlowMessageRelationshipsActionRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4157,9 +4157,9 @@ public function getFlowMessageRelationshipsActionRequest($id, $apiKey = null) * Get Flow Relationships Flow Actions * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4177,9 +4177,9 @@ public function getFlowRelationshipsFlowActions($id, $filter = null, $page_size * Get Flow Relationships Flow Actions * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4348,9 +4348,9 @@ public function getFlowRelationshipsFlowActionsWithHttpInfo($id, $filter = null, * Get Flow Relationships Flow Actions * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4371,9 +4371,9 @@ function ($response) { * Get Flow Relationships Flow Actions * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4428,9 +4428,9 @@ function ($exception) { * Create request for operation 'getFlowRelationshipsFlowActions' * * @param string $id (required) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`action_type`: `equals`<br>`status`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) * @param int $page_size Default: 50. Min: 1. Max: 100. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4548,7 +4548,7 @@ public function getFlowRelationshipsFlowActionsRequest($id, $filter = null, $pag $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4913,7 +4913,7 @@ public function getFlowRelationshipsTagsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4936,7 +4936,7 @@ public function getFlowRelationshipsTagsRequest($id, $apiKey = null) * Get Flow Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4954,7 +4954,7 @@ public function getFlowTags($id, $fields_tag = null, $apiKey = null) * Get Flow Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5123,7 +5123,7 @@ public function getFlowTagsWithHttpInfo($id, $fields_tag = null, $apiKey = null) * Get Flow Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5144,7 +5144,7 @@ function ($response) { * Get Flow Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5199,7 +5199,7 @@ function ($exception) { * Create request for operation 'getFlowTags' * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5292,7 +5292,7 @@ public function getFlowTagsRequest($id, $fields_tag = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5314,21 +5314,22 @@ public function getFlowTagsRequest($id, $fields_tag = null, $apiKey = null) * * Get Flows * - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getFlows($fields_flow_action = null, $fields_flow = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlows($fields_flow_action = null, $fields_flow = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) { - list($response) = $this->getFlowsWithHttpInfo($fields_flow_action, $fields_flow, $filter, $include, $page_cursor, $page_size, $sort, $apiKey); + list($response) = $this->getFlowsWithHttpInfo($fields_flow_action, $fields_flow, $fields_tag, $filter, $include, $page_cursor, $page_size, $sort, $apiKey); return $response; } @@ -5337,21 +5338,22 @@ public function getFlows($fields_flow_action = null, $fields_flow = null, $filte * * Get Flows * - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getFlowsWithHttpInfo($fields_flow_action = null, $fields_flow = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowsWithHttpInfo($fields_flow_action = null, $fields_flow = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) { - $request = $this->getFlowsRequest($fields_flow_action, $fields_flow, $filter, $include, $page_cursor, $page_size, $sort, $apiKey); + $request = $this->getFlowsRequest($fields_flow_action, $fields_flow, $fields_tag, $filter, $include, $page_cursor, $page_size, $sort, $apiKey); try { $options = $this->createHttpClientOption(); @@ -5511,20 +5513,21 @@ public function getFlowsWithHttpInfo($fields_flow_action = null, $fields_flow = * * Get Flows * - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFlowsAsync($fields_flow_action = null, $fields_flow = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowsAsync($fields_flow_action = null, $fields_flow = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) { - return $this->getFlowsAsyncWithHttpInfo($fields_flow_action, $fields_flow, $filter, $include, $page_cursor, $page_size, $sort, $apiKey) + return $this->getFlowsAsyncWithHttpInfo($fields_flow_action, $fields_flow, $fields_tag, $filter, $include, $page_cursor, $page_size, $sort, $apiKey) ->then( function ($response) { return $response[0]; @@ -5537,21 +5540,22 @@ function ($response) { * * Get Flows * - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFlowsAsyncWithHttpInfo($fields_flow_action = null, $fields_flow = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowsAsyncWithHttpInfo($fields_flow_action = null, $fields_flow = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getFlowsRequest($fields_flow_action, $fields_flow, $filter, $include, $page_cursor, $page_size, $sort, $apiKey); + $request = $this->getFlowsRequest($fields_flow_action, $fields_flow, $fields_tag, $filter, $include, $page_cursor, $page_size, $sort, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5597,18 +5601,19 @@ function ($exception) { /** * Create request for operation 'getFlows' * - * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_flow For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`status`: `equals`<br>`archived`: `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`trigger_type`: `equals` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 50. Min: 1. Max: 50. (optional, default to 50) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFlowsRequest($fields_flow_action = null, $fields_flow = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) + public function getFlowsRequest($fields_flow_action = null, $fields_flow = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $page_size = 50, $sort = null, $apiKey = null) { if ($page_size !== null && $page_size > 50) { throw new \InvalidArgumentException('invalid value for "$page_size" when calling FlowsApi.getFlows, must be smaller than or equal to 50.'); @@ -5644,6 +5649,15 @@ public function getFlowsRequest($fields_flow_action = null, $fields_flow = null, false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $filter, 'filter', // param base name @@ -5743,7 +5757,7 @@ public function getFlowsRequest($fields_flow_action = null, $fields_flow = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6125,7 +6139,7 @@ public function updateFlowRequest($id, $flow_update_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/ListsApi.php b/lib/API/ListsApi.php index 8b67345..22a6515 100644 --- a/lib/API/ListsApi.php +++ b/lib/API/ListsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -462,7 +462,7 @@ public function createListRequest($list_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -732,7 +732,7 @@ public function createListRelationshipsRequest($id, $list_members_add_query, $ap $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -985,7 +985,7 @@ public function deleteListRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1255,7 +1255,7 @@ public function deleteListRelationshipsRequest($id, $list_members_delete_query, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1278,15 +1278,18 @@ public function deleteListRelationshipsRequest($id, $list_members_delete_query, * Get List * * @param string $id Primary key that uniquely identifies this list. Generated by Klaviyo. (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_list Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getList($id, $fields_list = null, $apiKey = null) + public function getList($id, $additional_fields_list = null, $fields_list = null, $fields_tag = null, $include = null, $apiKey = null) { - list($response) = $this->getListWithHttpInfo($id, $fields_list, $apiKey); + list($response) = $this->getListWithHttpInfo($id, $additional_fields_list, $fields_list, $fields_tag, $include, $apiKey); return $response; } @@ -1296,15 +1299,18 @@ public function getList($id, $fields_list = null, $apiKey = null) * Get List * * @param string $id Primary key that uniquely identifies this list. Generated by Klaviyo. (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_list Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getListWithHttpInfo($id, $fields_list = null, $apiKey = null) + public function getListWithHttpInfo($id, $additional_fields_list = null, $fields_list = null, $fields_tag = null, $include = null, $apiKey = null) { - $request = $this->getListRequest($id, $fields_list, $apiKey); + $request = $this->getListRequest($id, $additional_fields_list, $fields_list, $fields_tag, $include, $apiKey); try { $options = $this->createHttpClientOption(); @@ -1465,14 +1471,17 @@ public function getListWithHttpInfo($id, $fields_list = null, $apiKey = null) * Get List * * @param string $id Primary key that uniquely identifies this list. Generated by Klaviyo. (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_list Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListAsync($id, $fields_list = null, $apiKey = null) + public function getListAsync($id, $additional_fields_list = null, $fields_list = null, $fields_tag = null, $include = null, $apiKey = null) { - return $this->getListAsyncWithHttpInfo($id, $fields_list, $apiKey) + return $this->getListAsyncWithHttpInfo($id, $additional_fields_list, $fields_list, $fields_tag, $include, $apiKey) ->then( function ($response) { return $response[0]; @@ -1486,15 +1495,18 @@ function ($response) { * Get List * * @param string $id Primary key that uniquely identifies this list. Generated by Klaviyo. (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_list Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListAsyncWithHttpInfo($id, $fields_list = null, $apiKey = null) + public function getListAsyncWithHttpInfo($id, $additional_fields_list = null, $fields_list = null, $fields_tag = null, $include = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getListRequest($id, $fields_list, $apiKey); + $request = $this->getListRequest($id, $additional_fields_list, $fields_list, $fields_tag, $include, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1541,12 +1553,15 @@ function ($exception) { * Create request for operation 'getList' * * @param string $id Primary key that uniquely identifies this list. Generated by Klaviyo. (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_list Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getListRequest($id, $fields_list = null, $apiKey = null) + public function getListRequest($id, $additional_fields_list = null, $fields_list = null, $fields_tag = null, $include = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -1562,6 +1577,15 @@ public function getListRequest($id, $fields_list = null, $apiKey = null) $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $additional_fields_list, + 'additional-fields[list]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $fields_list, @@ -1571,6 +1595,24 @@ public function getListRequest($id, $fields_list = null, $apiKey = null) false, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // path params @@ -1634,7 +1676,7 @@ public function getListRequest($id, $fields_list = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1658,9 +1700,9 @@ public function getListRequest($id, $fields_list = null, $apiKey = null) * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \KlaviyoAPI\ApiException on non-2xx response @@ -1680,9 +1722,9 @@ public function getListProfiles($id, $additional_fields_profile = null, $fields_ * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \KlaviyoAPI\ApiException on non-2xx response @@ -1853,9 +1895,9 @@ public function getListProfilesWithHttpInfo($id, $additional_fields_profile = nu * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \InvalidArgumentException @@ -1878,9 +1920,9 @@ function ($response) { * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \InvalidArgumentException @@ -1937,9 +1979,9 @@ function ($exception) { * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \InvalidArgumentException @@ -2076,7 +2118,7 @@ public function getListProfilesRequest($id, $additional_fields_profile = null, $ $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2099,7 +2141,7 @@ public function getListProfilesRequest($id, $additional_fields_profile = null, $ * Get List Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2117,7 +2159,7 @@ public function getListRelationshipsProfiles($id, $page_cursor = null, $apiKey = * Get List Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2286,7 +2328,7 @@ public function getListRelationshipsProfilesWithHttpInfo($id, $page_cursor = nul * Get List Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2307,7 +2349,7 @@ function ($response) { * Get List Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2362,7 +2404,7 @@ function ($exception) { * Create request for operation 'getListRelationshipsProfiles' * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2455,7 +2497,7 @@ public function getListRelationshipsProfilesRequest($id, $page_cursor = null, $a $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2820,7 +2862,7 @@ public function getListRelationshipsTagsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2843,7 +2885,7 @@ public function getListRelationshipsTagsRequest($id, $apiKey = null) * Get List Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2861,7 +2903,7 @@ public function getListTags($id, $fields_tag = null, $apiKey = null) * Get List Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -3030,7 +3072,7 @@ public function getListTagsWithHttpInfo($id, $fields_tag = null, $apiKey = null) * Get List Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3051,7 +3093,7 @@ function ($response) { * Get List Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -3106,7 +3148,7 @@ function ($exception) { * Create request for operation 'getListTags' * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -3199,7 +3241,7 @@ public function getListTagsRequest($id, $fields_tag = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3221,17 +3263,19 @@ public function getListTagsRequest($id, $fields_tag = null, $apiKey = null) * * Get Lists * - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getLists($fields_list = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getLists($fields_list = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { - list($response) = $this->getListsWithHttpInfo($fields_list, $filter, $page_cursor, $apiKey); + list($response) = $this->getListsWithHttpInfo($fields_list, $fields_tag, $filter, $include, $page_cursor, $apiKey); return $response; } @@ -3240,17 +3284,19 @@ public function getLists($fields_list = null, $filter = null, $page_cursor = nul * * Get Lists * - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getListsWithHttpInfo($fields_list = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getListsWithHttpInfo($fields_list = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { - $request = $this->getListsRequest($fields_list, $filter, $page_cursor, $apiKey); + $request = $this->getListsRequest($fields_list, $fields_tag, $filter, $include, $page_cursor, $apiKey); try { $options = $this->createHttpClientOption(); @@ -3410,16 +3456,18 @@ public function getListsWithHttpInfo($fields_list = null, $filter = null, $page_ * * Get Lists * - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListsAsync($fields_list = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getListsAsync($fields_list = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { - return $this->getListsAsyncWithHttpInfo($fields_list, $filter, $page_cursor, $apiKey) + return $this->getListsAsyncWithHttpInfo($fields_list, $fields_tag, $filter, $include, $page_cursor, $apiKey) ->then( function ($response) { return $response[0]; @@ -3432,17 +3480,19 @@ function ($response) { * * Get Lists * - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getListsAsyncWithHttpInfo($fields_list = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getListsAsyncWithHttpInfo($fields_list = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getListsRequest($fields_list, $filter, $page_cursor, $apiKey); + $request = $this->getListsRequest($fields_list, $fields_tag, $filter, $include, $page_cursor, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3488,14 +3538,16 @@ function ($exception) { /** * Create request for operation 'getLists' * - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getListsRequest($fields_list = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getListsRequest($fields_list = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { $resourcePath = '/api/lists/'; @@ -3515,6 +3567,15 @@ public function getListsRequest($fields_list = null, $filter = null, $page_curso false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $filter, 'filter', // param base name @@ -3524,6 +3585,15 @@ public function getListsRequest($fields_list = null, $filter = null, $page_curso false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $page_cursor, 'page[cursor]', // param base name @@ -3587,7 +3657,7 @@ public function getListsRequest($fields_list = null, $filter = null, $page_curso $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3969,7 +4039,7 @@ public function updateListRequest($id, $list_partial_update_query, $apiKey = nul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/MetricsApi.php b/lib/API/MetricsApi.php index 0753e22..90539eb 100644 --- a/lib/API/MetricsApi.php +++ b/lib/API/MetricsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -122,7 +122,7 @@ public function getConfig() * Get Metric * * @param string $id Metric ID (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -140,7 +140,7 @@ public function getMetric($id, $fields_metric = null, $apiKey = null) * Get Metric * * @param string $id Metric ID (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -309,7 +309,7 @@ public function getMetricWithHttpInfo($id, $fields_metric = null, $apiKey = null * Get Metric * * @param string $id Metric ID (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -330,7 +330,7 @@ function ($response) { * Get Metric * * @param string $id Metric ID (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -385,7 +385,7 @@ function ($exception) { * Create request for operation 'getMetric' * * @param string $id Metric ID (required) - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -478,7 +478,7 @@ public function getMetricRequest($id, $fields_metric = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -500,9 +500,9 @@ public function getMetricRequest($id, $fields_metric = null, $apiKey = null) * * Get Metrics * - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -519,9 +519,9 @@ public function getMetrics($fields_metric = null, $filter = null, $page_cursor = * * Get Metrics * - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -689,9 +689,9 @@ public function getMetricsWithHttpInfo($fields_metric = null, $filter = null, $p * * Get Metrics * - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -711,9 +711,9 @@ function ($response) { * * Get Metrics * - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -767,9 +767,9 @@ function ($exception) { /** * Create request for operation 'getMetrics' * - * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_metric For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`integration.name`: `equals`<br>`integration.category`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -866,7 +866,7 @@ public function getMetricsRequest($fields_metric = null, $filter = null, $page_c $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1229,7 +1229,7 @@ public function queryMetricAggregatesRequest($metric_aggregate_query, $apiKey = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/ProfilesApi.php b/lib/API/ProfilesApi.php index eceefa3..8c03115 100644 --- a/lib/API/ProfilesApi.php +++ b/lib/API/ProfilesApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -462,7 +462,7 @@ public function createProfileRequest($profile_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -486,10 +486,10 @@ public function createProfileRequest($profile_create_query, $apiKey = null) * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -508,10 +508,10 @@ public function getProfile($id, $additional_fields_profile = null, $fields_list * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -681,10 +681,10 @@ public function getProfileWithHttpInfo($id, $additional_fields_profile = null, $ * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -706,10 +706,10 @@ function ($response) { * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -765,10 +765,10 @@ function ($exception) { * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#relationships (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -897,7 +897,7 @@ public function getProfileRequest($id, $additional_fields_profile = null, $field $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -920,7 +920,7 @@ public function getProfileRequest($id, $additional_fields_profile = null, $field * Get Profile Lists * * @param string $id (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -938,7 +938,7 @@ public function getProfileLists($id, $fields_list = null, $apiKey = null) * Get Profile Lists * * @param string $id (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1107,7 +1107,7 @@ public function getProfileListsWithHttpInfo($id, $fields_list = null, $apiKey = * Get Profile Lists * * @param string $id (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1128,7 +1128,7 @@ function ($response) { * Get Profile Lists * * @param string $id (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1183,7 +1183,7 @@ function ($exception) { * Create request for operation 'getProfileLists' * * @param string $id (required) - * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_list For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1276,7 +1276,7 @@ public function getProfileListsRequest($id, $fields_list = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1641,7 +1641,7 @@ public function getProfileRelationshipsListsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2006,7 +2006,7 @@ public function getProfileRelationshipsSegmentsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2029,7 +2029,7 @@ public function getProfileRelationshipsSegmentsRequest($id, $apiKey = null) * Get Profile Segments * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2047,7 +2047,7 @@ public function getProfileSegments($id, $fields_segment = null, $apiKey = null) * Get Profile Segments * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2216,7 +2216,7 @@ public function getProfileSegmentsWithHttpInfo($id, $fields_segment = null, $api * Get Profile Segments * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2237,7 +2237,7 @@ function ($response) { * Get Profile Segments * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2292,7 +2292,7 @@ function ($exception) { * Create request for operation 'getProfileSegments' * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2385,7 +2385,7 @@ public function getProfileSegmentsRequest($id, $fields_segment = null, $apiKey = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2408,11 +2408,11 @@ public function getProfileSegmentsRequest($id, $fields_segment = null, $apiKey = * Get Profiles * * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2430,11 +2430,11 @@ public function getProfiles($additional_fields_profile = null, $fields_profile = * Get Profiles * * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2603,11 +2603,11 @@ public function getProfilesWithHttpInfo($additional_fields_profile = null, $fiel * Get Profiles * * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2628,11 +2628,11 @@ function ($response) { * Get Profiles * * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2687,11 +2687,11 @@ function ($exception) { * Create request for operation 'getProfiles' * * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`email`: `any`, `equals`<br>`phone_number`: `any`, `equals`<br>`external_id`: `any`, `equals`<br>`_kx`: `equals`<br>`created`: `greater-than`, `less-than`<br>`updated`: `greater-than`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2822,7 +2822,7 @@ public function getProfilesRequest($additional_fields_profile = null, $fields_pr $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3073,7 +3073,7 @@ public function subscribeProfilesRequest($subscription_create_job_create_query, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3324,7 +3324,7 @@ public function suppressProfilesRequest($suppression_create_job_create_query, $a $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3346,15 +3346,15 @@ public function suppressProfilesRequest($suppression_create_job_create_query, $a * * Unsubscribe Profiles * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQuery $unsubscription_create_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQuery $subscription_delete_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function unsubscribeProfiles($unsubscription_create_job_create_query, $apiKey = null) + public function unsubscribeProfiles($subscription_delete_job_create_query, $apiKey = null) { - $this->unsubscribeProfilesWithHttpInfo($unsubscription_create_job_create_query, $apiKey); + $this->unsubscribeProfilesWithHttpInfo($subscription_delete_job_create_query, $apiKey); } /** @@ -3362,15 +3362,15 @@ public function unsubscribeProfiles($unsubscription_create_job_create_query, $ap * * Unsubscribe Profiles * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQuery $unsubscription_create_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQuery $subscription_delete_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function unsubscribeProfilesWithHttpInfo($unsubscription_create_job_create_query, $apiKey = null) + public function unsubscribeProfilesWithHttpInfo($subscription_delete_job_create_query, $apiKey = null) { - $request = $this->unsubscribeProfilesRequest($unsubscription_create_job_create_query, $apiKey); + $request = $this->unsubscribeProfilesRequest($subscription_delete_job_create_query, $apiKey); try { $options = $this->createHttpClientOption(); @@ -3437,14 +3437,14 @@ public function unsubscribeProfilesWithHttpInfo($unsubscription_create_job_creat * * Unsubscribe Profiles * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQuery $unsubscription_create_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQuery $subscription_delete_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unsubscribeProfilesAsync($unsubscription_create_job_create_query, $apiKey = null) + public function unsubscribeProfilesAsync($subscription_delete_job_create_query, $apiKey = null) { - return $this->unsubscribeProfilesAsyncWithHttpInfo($unsubscription_create_job_create_query, $apiKey) + return $this->unsubscribeProfilesAsyncWithHttpInfo($subscription_delete_job_create_query, $apiKey) ->then( function ($response) { return $response[0]; @@ -3457,15 +3457,15 @@ function ($response) { * * Unsubscribe Profiles * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQuery $unsubscription_create_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQuery $subscription_delete_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unsubscribeProfilesAsyncWithHttpInfo($unsubscription_create_job_create_query, $apiKey = null) + public function unsubscribeProfilesAsyncWithHttpInfo($subscription_delete_job_create_query, $apiKey = null) { $returnType = ''; - $request = $this->unsubscribeProfilesRequest($unsubscription_create_job_create_query, $apiKey); + $request = $this->unsubscribeProfilesRequest($subscription_delete_job_create_query, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3493,21 +3493,21 @@ function ($exception) { /** * Create request for operation 'unsubscribeProfiles' * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQuery $unsubscription_create_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQuery $subscription_delete_job_create_query Unsubscribes one or more profiles from marketing. Currently, supports email and SMS only. All profiles will be removed from the provided list. Either email or phone number is required. If a profile cannot be found matching the given identifier(s), a new profile will be created and then unsubscribed. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unsubscribeProfilesRequest($unsubscription_create_job_create_query, $apiKey = null) + public function unsubscribeProfilesRequest($subscription_delete_job_create_query, $apiKey = null) { - // verify the required parameter 'unsubscription_create_job_create_query' is set - if ($unsubscription_create_job_create_query === null || (is_array($unsubscription_create_job_create_query) && count($unsubscription_create_job_create_query) === 0)) { + // verify the required parameter 'subscription_delete_job_create_query' is set + if ($subscription_delete_job_create_query === null || (is_array($subscription_delete_job_create_query) && count($subscription_delete_job_create_query) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $unsubscription_create_job_create_query when calling unsubscribeProfiles' + 'Missing the required parameter $subscription_delete_job_create_query when calling unsubscribeProfiles' ); } - $resourcePath = '/api/profile-unsubscription-bulk-create-jobs/'; + $resourcePath = '/api/profile-subscription-bulk-delete-jobs/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3530,11 +3530,11 @@ public function unsubscribeProfilesRequest($unsubscription_create_job_create_que } // for model (json/xml) - if (isset($unsubscription_create_job_create_query)) { + if (isset($subscription_delete_job_create_query)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($unsubscription_create_job_create_query)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($subscription_delete_job_create_query)); } else { - $httpBody = $unsubscription_create_job_create_query; + $httpBody = $subscription_delete_job_create_query; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -3575,7 +3575,7 @@ public function unsubscribeProfilesRequest($unsubscription_create_job_create_que $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3597,15 +3597,15 @@ public function unsubscribeProfilesRequest($unsubscription_create_job_create_que * * Unsuppress Profiles * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQuery $unsuppression_create_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQuery $suppression_delete_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function unsuppressProfiles($unsuppression_create_job_create_query, $apiKey = null) + public function unsuppressProfiles($suppression_delete_job_create_query, $apiKey = null) { - $this->unsuppressProfilesWithHttpInfo($unsuppression_create_job_create_query, $apiKey); + $this->unsuppressProfilesWithHttpInfo($suppression_delete_job_create_query, $apiKey); } /** @@ -3613,15 +3613,15 @@ public function unsuppressProfiles($unsuppression_create_job_create_query, $apiK * * Unsuppress Profiles * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQuery $unsuppression_create_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQuery $suppression_delete_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function unsuppressProfilesWithHttpInfo($unsuppression_create_job_create_query, $apiKey = null) + public function unsuppressProfilesWithHttpInfo($suppression_delete_job_create_query, $apiKey = null) { - $request = $this->unsuppressProfilesRequest($unsuppression_create_job_create_query, $apiKey); + $request = $this->unsuppressProfilesRequest($suppression_delete_job_create_query, $apiKey); try { $options = $this->createHttpClientOption(); @@ -3688,14 +3688,14 @@ public function unsuppressProfilesWithHttpInfo($unsuppression_create_job_create_ * * Unsuppress Profiles * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQuery $unsuppression_create_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQuery $suppression_delete_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unsuppressProfilesAsync($unsuppression_create_job_create_query, $apiKey = null) + public function unsuppressProfilesAsync($suppression_delete_job_create_query, $apiKey = null) { - return $this->unsuppressProfilesAsyncWithHttpInfo($unsuppression_create_job_create_query, $apiKey) + return $this->unsuppressProfilesAsyncWithHttpInfo($suppression_delete_job_create_query, $apiKey) ->then( function ($response) { return $response[0]; @@ -3708,15 +3708,15 @@ function ($response) { * * Unsuppress Profiles * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQuery $unsuppression_create_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQuery $suppression_delete_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function unsuppressProfilesAsyncWithHttpInfo($unsuppression_create_job_create_query, $apiKey = null) + public function unsuppressProfilesAsyncWithHttpInfo($suppression_delete_job_create_query, $apiKey = null) { $returnType = ''; - $request = $this->unsuppressProfilesRequest($unsuppression_create_job_create_query, $apiKey); + $request = $this->unsuppressProfilesRequest($suppression_delete_job_create_query, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3744,21 +3744,21 @@ function ($exception) { /** * Create request for operation 'unsuppressProfiles' * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQuery $unsuppression_create_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQuery $suppression_delete_job_create_query Unsuppresses one or more profiles from receiving marketing. Currently, supports email only. If a profile is not found with the given email, no action will be taken. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function unsuppressProfilesRequest($unsuppression_create_job_create_query, $apiKey = null) + public function unsuppressProfilesRequest($suppression_delete_job_create_query, $apiKey = null) { - // verify the required parameter 'unsuppression_create_job_create_query' is set - if ($unsuppression_create_job_create_query === null || (is_array($unsuppression_create_job_create_query) && count($unsuppression_create_job_create_query) === 0)) { + // verify the required parameter 'suppression_delete_job_create_query' is set + if ($suppression_delete_job_create_query === null || (is_array($suppression_delete_job_create_query) && count($suppression_delete_job_create_query) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $unsuppression_create_job_create_query when calling unsuppressProfiles' + 'Missing the required parameter $suppression_delete_job_create_query when calling unsuppressProfiles' ); } - $resourcePath = '/api/profile-unsuppression-bulk-create-jobs/'; + $resourcePath = '/api/profile-suppression-bulk-delete-jobs/'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3781,11 +3781,11 @@ public function unsuppressProfilesRequest($unsuppression_create_job_create_query } // for model (json/xml) - if (isset($unsuppression_create_job_create_query)) { + if (isset($suppression_delete_job_create_query)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($unsuppression_create_job_create_query)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($suppression_delete_job_create_query)); } else { - $httpBody = $unsuppression_create_job_create_query; + $httpBody = $suppression_delete_job_create_query; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -3826,7 +3826,7 @@ public function unsuppressProfilesRequest($unsuppression_create_job_create_query $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4208,7 +4208,7 @@ public function updateProfileRequest($id, $profile_partial_update_query, $apiKey $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/SegmentsApi.php b/lib/API/SegmentsApi.php index 6da417c..8ca17d5 100644 --- a/lib/API/SegmentsApi.php +++ b/lib/API/SegmentsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -122,15 +122,18 @@ public function getConfig() * Get Segment * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_segment Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getSegment($id, $fields_segment = null, $apiKey = null) + public function getSegment($id, $additional_fields_segment = null, $fields_segment = null, $fields_tag = null, $include = null, $apiKey = null) { - list($response) = $this->getSegmentWithHttpInfo($id, $fields_segment, $apiKey); + list($response) = $this->getSegmentWithHttpInfo($id, $additional_fields_segment, $fields_segment, $fields_tag, $include, $apiKey); return $response; } @@ -140,15 +143,18 @@ public function getSegment($id, $fields_segment = null, $apiKey = null) * Get Segment * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_segment Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getSegmentWithHttpInfo($id, $fields_segment = null, $apiKey = null) + public function getSegmentWithHttpInfo($id, $additional_fields_segment = null, $fields_segment = null, $fields_tag = null, $include = null, $apiKey = null) { - $request = $this->getSegmentRequest($id, $fields_segment, $apiKey); + $request = $this->getSegmentRequest($id, $additional_fields_segment, $fields_segment, $fields_tag, $include, $apiKey); try { $options = $this->createHttpClientOption(); @@ -309,14 +315,17 @@ public function getSegmentWithHttpInfo($id, $fields_segment = null, $apiKey = nu * Get Segment * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_segment Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSegmentAsync($id, $fields_segment = null, $apiKey = null) + public function getSegmentAsync($id, $additional_fields_segment = null, $fields_segment = null, $fields_tag = null, $include = null, $apiKey = null) { - return $this->getSegmentAsyncWithHttpInfo($id, $fields_segment, $apiKey) + return $this->getSegmentAsyncWithHttpInfo($id, $additional_fields_segment, $fields_segment, $fields_tag, $include, $apiKey) ->then( function ($response) { return $response[0]; @@ -330,15 +339,18 @@ function ($response) { * Get Segment * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_segment Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSegmentAsyncWithHttpInfo($id, $fields_segment = null, $apiKey = null) + public function getSegmentAsyncWithHttpInfo($id, $additional_fields_segment = null, $fields_segment = null, $fields_tag = null, $include = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getSegmentRequest($id, $fields_segment, $apiKey); + $request = $this->getSegmentRequest($id, $additional_fields_segment, $fields_segment, $fields_tag, $include, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -385,12 +397,15 @@ function ($exception) { * Create request for operation 'getSegment' * * @param string $id (required) - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $additional_fields_segment Request additional fields not included by default in the response. Supported values: 'profile_count' (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSegmentRequest($id, $fields_segment = null, $apiKey = null) + public function getSegmentRequest($id, $additional_fields_segment = null, $fields_segment = null, $fields_tag = null, $include = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -406,6 +421,15 @@ public function getSegmentRequest($id, $fields_segment = null, $apiKey = null) $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $additional_fields_segment, + 'additional-fields[segment]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $fields_segment, @@ -415,6 +439,24 @@ public function getSegmentRequest($id, $fields_segment = null, $apiKey = null) false, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // path params @@ -478,7 +520,7 @@ public function getSegmentRequest($id, $fields_segment = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -502,9 +544,9 @@ public function getSegmentRequest($id, $fields_segment = null, $apiKey = null) * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \KlaviyoAPI\ApiException on non-2xx response @@ -524,9 +566,9 @@ public function getSegmentProfiles($id, $additional_fields_profile = null, $fiel * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \KlaviyoAPI\ApiException on non-2xx response @@ -697,9 +739,9 @@ public function getSegmentProfilesWithHttpInfo($id, $additional_fields_profile = * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \InvalidArgumentException @@ -722,9 +764,9 @@ function ($response) { * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \InvalidArgumentException @@ -781,9 +823,9 @@ function ($exception) { * * @param string $id (required) * @param string[] $additional_fields_profile Request additional fields not included by default in the response. Supported values: 'predictive_analytics' (optional) - * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_profile For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`email`: `any`<br>`phone_number`: `any`<br>`push_token`: `any`<br>`_kx`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * @param int $page_size Default: 20. Min: 1. Max: 100. (optional, default to 20) * * @throws \InvalidArgumentException @@ -920,7 +962,7 @@ public function getSegmentProfilesRequest($id, $additional_fields_profile = null $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -943,7 +985,7 @@ public function getSegmentProfilesRequest($id, $additional_fields_profile = null * Get Segment Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -961,7 +1003,7 @@ public function getSegmentRelationshipsProfiles($id, $page_cursor = null, $apiKe * Get Segment Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1130,7 +1172,7 @@ public function getSegmentRelationshipsProfilesWithHttpInfo($id, $page_cursor = * Get Segment Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1151,7 +1193,7 @@ function ($response) { * Get Segment Relationships Profiles * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1206,7 +1248,7 @@ function ($exception) { * Create request for operation 'getSegmentRelationshipsProfiles' * * @param string $id (required) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1299,7 +1341,7 @@ public function getSegmentRelationshipsProfilesRequest($id, $page_cursor = null, $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1664,7 +1706,7 @@ public function getSegmentRelationshipsTagsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1687,7 +1729,7 @@ public function getSegmentRelationshipsTagsRequest($id, $apiKey = null) * Get Segment Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1705,7 +1747,7 @@ public function getSegmentTags($id, $fields_tag = null, $apiKey = null) * Get Segment Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1874,7 +1916,7 @@ public function getSegmentTagsWithHttpInfo($id, $fields_tag = null, $apiKey = nu * Get Segment Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1895,7 +1937,7 @@ function ($response) { * Get Segment Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1950,7 +1992,7 @@ function ($exception) { * Create request for operation 'getSegmentTags' * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2043,7 +2085,7 @@ public function getSegmentTagsRequest($id, $fields_tag = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2065,17 +2107,19 @@ public function getSegmentTagsRequest($id, $fields_tag = null, $apiKey = null) * * Get Segments * - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getSegments($fields_segment = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getSegments($fields_segment = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { - list($response) = $this->getSegmentsWithHttpInfo($fields_segment, $filter, $page_cursor, $apiKey); + list($response) = $this->getSegmentsWithHttpInfo($fields_segment, $fields_tag, $filter, $include, $page_cursor, $apiKey); return $response; } @@ -2084,17 +2128,19 @@ public function getSegments($fields_segment = null, $filter = null, $page_cursor * * Get Segments * - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getSegmentsWithHttpInfo($fields_segment = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getSegmentsWithHttpInfo($fields_segment = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { - $request = $this->getSegmentsRequest($fields_segment, $filter, $page_cursor, $apiKey); + $request = $this->getSegmentsRequest($fields_segment, $fields_tag, $filter, $include, $page_cursor, $apiKey); try { $options = $this->createHttpClientOption(); @@ -2254,16 +2300,18 @@ public function getSegmentsWithHttpInfo($fields_segment = null, $filter = null, * * Get Segments * - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSegmentsAsync($fields_segment = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getSegmentsAsync($fields_segment = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { - return $this->getSegmentsAsyncWithHttpInfo($fields_segment, $filter, $page_cursor, $apiKey) + return $this->getSegmentsAsyncWithHttpInfo($fields_segment, $fields_tag, $filter, $include, $page_cursor, $apiKey) ->then( function ($response) { return $response[0]; @@ -2276,17 +2324,19 @@ function ($response) { * * Get Segments * - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSegmentsAsyncWithHttpInfo($fields_segment = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getSegmentsAsyncWithHttpInfo($fields_segment = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getSegmentsRequest($fields_segment, $filter, $page_cursor, $apiKey); + $request = $this->getSegmentsRequest($fields_segment, $fields_tag, $filter, $include, $page_cursor, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2332,14 +2382,16 @@ function ($exception) { /** * Create request for operation 'getSegments' * - * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) + * @param string[] $fields_segment For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `any`, `equals`<br>`id`: `any`, `equals`<br>`created`: `greater-than`<br>`updated`: `greater-than` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSegmentsRequest($fields_segment = null, $filter = null, $page_cursor = null, $apiKey = null) + public function getSegmentsRequest($fields_segment = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $apiKey = null) { $resourcePath = '/api/segments/'; @@ -2359,6 +2411,15 @@ public function getSegmentsRequest($fields_segment = null, $filter = null, $page false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag, + 'fields[tag]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $filter, 'filter', // param base name @@ -2368,6 +2429,15 @@ public function getSegmentsRequest($fields_segment = null, $filter = null, $page false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $page_cursor, 'page[cursor]', // param base name @@ -2431,7 +2501,7 @@ public function getSegmentsRequest($fields_segment = null, $filter = null, $page $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2813,7 +2883,7 @@ public function updateSegmentRequest($id, $segment_partial_update_query, $apiKey $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/TagsApi.php b/lib/API/TagsApi.php index 1611be1..1835abe 100644 --- a/lib/API/TagsApi.php +++ b/lib/API/TagsApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -462,7 +462,7 @@ public function createTagRequest($tag_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -825,7 +825,7 @@ public function createTagGroupRequest($tag_group_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1095,7 +1095,7 @@ public function createTagRelationshipsCampaignsRequest($id, $tag_campaign_op, $a $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1365,7 +1365,7 @@ public function createTagRelationshipsFlowsRequest($id, $tag_flow_op, $apiKey = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1635,7 +1635,7 @@ public function createTagRelationshipsListsRequest($id, $tag_list_op, $apiKey = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1905,7 +1905,7 @@ public function createTagRelationshipsSegmentsRequest($id, $tag_segment_op, $api $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1931,12 +1931,11 @@ public function createTagRelationshipsSegmentsRequest($id, $tag_segment_op, $api * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + * @return void */ public function deleteTag($id, $apiKey = null) { - list($response) = $this->deleteTagWithHttpInfo($id, $apiKey); - return $response; + $this->deleteTagWithHttpInfo($id, $apiKey); } /** @@ -1948,7 +1947,7 @@ public function deleteTag($id, $apiKey = null) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ public function deleteTagWithHttpInfo($id, $apiKey = null) { @@ -1989,103 +1988,10 @@ public function deleteTagWithHttpInfo($id, $apiKey = null) ); } - switch($statusCode) { - case 200: - if ('array' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('array<string,mixed>' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'array'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'array', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -2139,32 +2045,14 @@ function ($response) { */ public function deleteTagAsyncWithHttpInfo($id, $apiKey = null) { - $returnType = 'array'; + $returnType = ''; $request = $this->deleteTagRequest($id, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -2270,7 +2158,7 @@ public function deleteTagRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2635,7 +2523,7 @@ public function deleteTagGroupRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2905,7 +2793,7 @@ public function deleteTagRelationshipsCampaignsRequest($id, $tag_campaign_op, $a $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3175,7 +3063,7 @@ public function deleteTagRelationshipsFlowsRequest($id, $tag_flow_op, $apiKey = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3445,7 +3333,7 @@ public function deleteTagRelationshipsListsRequest($id, $tag_list_op, $apiKey = $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3715,7 +3603,7 @@ public function deleteTagRelationshipsSegmentsRequest($id, $tag_segment_op, $api $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -3738,15 +3626,17 @@ public function deleteTagRelationshipsSegmentsRequest($id, $tag_segment_op, $api * Get Tag * * @param string $id The Tag ID (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getTag($id, $fields_tag = null, $apiKey = null) + public function getTag($id, $fields_tag_group = null, $fields_tag = null, $include = null, $apiKey = null) { - list($response) = $this->getTagWithHttpInfo($id, $fields_tag, $apiKey); + list($response) = $this->getTagWithHttpInfo($id, $fields_tag_group, $fields_tag, $include, $apiKey); return $response; } @@ -3756,15 +3646,17 @@ public function getTag($id, $fields_tag = null, $apiKey = null) * Get Tag * * @param string $id The Tag ID (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getTagWithHttpInfo($id, $fields_tag = null, $apiKey = null) + public function getTagWithHttpInfo($id, $fields_tag_group = null, $fields_tag = null, $include = null, $apiKey = null) { - $request = $this->getTagRequest($id, $fields_tag, $apiKey); + $request = $this->getTagRequest($id, $fields_tag_group, $fields_tag, $include, $apiKey); try { $options = $this->createHttpClientOption(); @@ -3925,14 +3817,16 @@ public function getTagWithHttpInfo($id, $fields_tag = null, $apiKey = null) * Get Tag * * @param string $id The Tag ID (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTagAsync($id, $fields_tag = null, $apiKey = null) + public function getTagAsync($id, $fields_tag_group = null, $fields_tag = null, $include = null, $apiKey = null) { - return $this->getTagAsyncWithHttpInfo($id, $fields_tag, $apiKey) + return $this->getTagAsyncWithHttpInfo($id, $fields_tag_group, $fields_tag, $include, $apiKey) ->then( function ($response) { return $response[0]; @@ -3946,15 +3840,17 @@ function ($response) { * Get Tag * * @param string $id The Tag ID (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTagAsyncWithHttpInfo($id, $fields_tag = null, $apiKey = null) + public function getTagAsyncWithHttpInfo($id, $fields_tag_group = null, $fields_tag = null, $include = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getTagRequest($id, $fields_tag, $apiKey); + $request = $this->getTagRequest($id, $fields_tag_group, $fields_tag, $include, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4001,12 +3897,14 @@ function ($exception) { * Create request for operation 'getTag' * * @param string $id The Tag ID (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTagRequest($id, $fields_tag = null, $apiKey = null) + public function getTagRequest($id, $fields_tag_group = null, $fields_tag = null, $include = null, $apiKey = null) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -4022,6 +3920,15 @@ public function getTagRequest($id, $fields_tag = null, $apiKey = null) $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag_group, + 'fields[tag-group]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $fields_tag, @@ -4031,6 +3938,15 @@ public function getTagRequest($id, $fields_tag = null, $apiKey = null) false, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // path params @@ -4094,7 +4010,7 @@ public function getTagRequest($id, $fields_tag = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4117,7 +4033,7 @@ public function getTagRequest($id, $fields_tag = null, $apiKey = null) * Get Tag Group * * @param string $id The Tag Group ID (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4135,7 +4051,7 @@ public function getTagGroup($id, $fields_tag_group = null, $apiKey = null) * Get Tag Group * * @param string $id The Tag Group ID (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4304,7 +4220,7 @@ public function getTagGroupWithHttpInfo($id, $fields_tag_group = null, $apiKey = * Get Tag Group * * @param string $id The Tag Group ID (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4325,7 +4241,7 @@ function ($response) { * Get Tag Group * * @param string $id The Tag Group ID (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4380,7 +4296,7 @@ function ($exception) { * Create request for operation 'getTagGroup' * * @param string $id The Tag Group ID (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4473,7 +4389,7 @@ public function getTagGroupRequest($id, $fields_tag_group = null, $apiKey = null $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4838,7 +4754,7 @@ public function getTagGroupRelationshipsTagsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -4861,7 +4777,7 @@ public function getTagGroupRelationshipsTagsRequest($id, $apiKey = null) * Get Tag Group Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4879,7 +4795,7 @@ public function getTagGroupTags($id, $fields_tag = null, $apiKey = null) * Get Tag Group Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5048,7 +4964,7 @@ public function getTagGroupTagsWithHttpInfo($id, $fields_tag = null, $apiKey = n * Get Tag Group Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5069,7 +4985,7 @@ function ($response) { * Get Tag Group Tags * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5124,7 +5040,7 @@ function ($exception) { * Create request for operation 'getTagGroupTags' * * @param string $id (required) - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5217,7 +5133,7 @@ public function getTagGroupTagsRequest($id, $fields_tag = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5239,10 +5155,10 @@ public function getTagGroupTagsRequest($id, $fields_tag = null, $apiKey = null) * * Get Tag Groups * - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5259,10 +5175,10 @@ public function getTagGroups($fields_tag_group = null, $filter = null, $page_cur * * Get Tag Groups * - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5430,10 +5346,10 @@ public function getTagGroupsWithHttpInfo($fields_tag_group = null, $filter = nul * * Get Tag Groups * - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5453,10 +5369,10 @@ function ($response) { * * Get Tag Groups * - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5510,10 +5426,10 @@ function ($exception) { /** * Create request for operation 'getTagGroups' * - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5619,7 +5535,7 @@ public function getTagGroupsRequest($fields_tag_group = null, $filter = null, $p $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -5984,7 +5900,7 @@ public function getTagRelationshipsCampaignsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6349,7 +6265,7 @@ public function getTagRelationshipsFlowsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -6714,7 +6630,7 @@ public function getTagRelationshipsListsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7079,7 +6995,7 @@ public function getTagRelationshipsSegmentsRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7444,7 +7360,7 @@ public function getTagRelationshipsTagGroupRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7467,7 +7383,7 @@ public function getTagRelationshipsTagGroupRequest($id, $apiKey = null) * Get Tag Tag Group * * @param string $id (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7485,7 +7401,7 @@ public function getTagTagGroup($id, $fields_tag_group = null, $apiKey = null) * Get Tag Tag Group * * @param string $id (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7654,7 +7570,7 @@ public function getTagTagGroupWithHttpInfo($id, $fields_tag_group = null, $apiKe * Get Tag Tag Group * * @param string $id (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7675,7 +7591,7 @@ function ($response) { * Get Tag Tag Group * * @param string $id (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7730,7 +7646,7 @@ function ($exception) { * Create request for operation 'getTagTagGroup' * * @param string $id (required) - * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -7823,7 +7739,7 @@ public function getTagTagGroupRequest($id, $fields_tag_group = null, $apiKey = n $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -7845,18 +7761,20 @@ public function getTagTagGroupRequest($id, $fields_tag_group = null, $apiKey = n * * Get Tags * - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response */ - public function getTags($fields_tag = null, $filter = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getTags($fields_tag_group = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { - list($response) = $this->getTagsWithHttpInfo($fields_tag, $filter, $page_cursor, $sort, $apiKey); + list($response) = $this->getTagsWithHttpInfo($fields_tag_group, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey); return $response; } @@ -7865,18 +7783,20 @@ public function getTags($fields_tag = null, $filter = null, $page_cursor = null, * * Get Tags * - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) */ - public function getTagsWithHttpInfo($fields_tag = null, $filter = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getTagsWithHttpInfo($fields_tag_group = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { - $request = $this->getTagsRequest($fields_tag, $filter, $page_cursor, $sort, $apiKey); + $request = $this->getTagsRequest($fields_tag_group, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey); try { $options = $this->createHttpClientOption(); @@ -8036,17 +7956,19 @@ public function getTagsWithHttpInfo($fields_tag = null, $filter = null, $page_cu * * Get Tags * - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTagsAsync($fields_tag = null, $filter = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getTagsAsync($fields_tag_group = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { - return $this->getTagsAsyncWithHttpInfo($fields_tag, $filter, $page_cursor, $sort, $apiKey) + return $this->getTagsAsyncWithHttpInfo($fields_tag_group, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey) ->then( function ($response) { return $response[0]; @@ -8059,18 +7981,20 @@ function ($response) { * * Get Tags * - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTagsAsyncWithHttpInfo($fields_tag = null, $filter = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getTagsAsyncWithHttpInfo($fields_tag_group = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { $returnType = 'array'; - $request = $this->getTagsRequest($fields_tag, $filter, $page_cursor, $sort, $apiKey); + $request = $this->getTagsRequest($fields_tag_group, $fields_tag, $filter, $include, $page_cursor, $sort, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8116,15 +8040,17 @@ function ($exception) { /** * Create request for operation 'getTags' * - * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` (optional) + * @param string[] $include For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#relationships (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTagsRequest($fields_tag = null, $filter = null, $page_cursor = null, $sort = null, $apiKey = null) + public function getTagsRequest($fields_tag_group = null, $fields_tag = null, $filter = null, $include = null, $page_cursor = null, $sort = null, $apiKey = null) { $resourcePath = '/api/tags/'; @@ -8134,6 +8060,15 @@ public function getTagsRequest($fields_tag = null, $filter = null, $page_cursor $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $fields_tag_group, + 'fields[tag-group]', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $fields_tag, @@ -8153,6 +8088,15 @@ public function getTagsRequest($fields_tag = null, $filter = null, $page_cursor false // required ) ?? []); // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include, + 'include', // param base name + 'array', // openApiType + 'form', // style + false, // explode + false // required + ) ?? []); + // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $page_cursor, 'page[cursor]', // param base name @@ -8225,7 +8169,7 @@ public function getTagsRequest($fields_tag = null, $filter = null, $page_cursor $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -8252,12 +8196,11 @@ public function getTagsRequest($fields_tag = null, $filter = null, $page_cursor * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + * @return void */ public function updateTag($id, $tag_update_query, $apiKey = null) { - list($response) = $this->updateTagWithHttpInfo($id, $tag_update_query, $apiKey); - return $response; + $this->updateTagWithHttpInfo($id, $tag_update_query, $apiKey); } /** @@ -8270,7 +8213,7 @@ public function updateTag($id, $tag_update_query, $apiKey = null) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ public function updateTagWithHttpInfo($id, $tag_update_query, $apiKey = null) { @@ -8311,103 +8254,10 @@ public function updateTagWithHttpInfo($id, $tag_update_query, $apiKey = null) ); } - switch($statusCode) { - case 200: - if ('array' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('array<string,mixed>' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'array'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'array', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -8463,32 +8313,14 @@ function ($response) { */ public function updateTagAsyncWithHttpInfo($id, $tag_update_query, $apiKey = null) { - $returnType = 'array'; + $returnType = ''; $request = $this->updateTagRequest($id, $tag_update_query, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -8607,7 +8439,7 @@ public function updateTagRequest($id, $tag_update_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -8989,7 +8821,7 @@ public function updateTagGroupRequest($id, $tag_group_update_query, $apiKey = nu $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/API/TemplatesApi.php b/lib/API/TemplatesApi.php index 7a99226..cc2215b 100644 --- a/lib/API/TemplatesApi.php +++ b/lib/API/TemplatesApi.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -462,7 +462,7 @@ public function createTemplateRequest($template_create_query, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -825,7 +825,7 @@ public function createTemplateCloneRequest($template_clone_query, $apiKey = null $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1188,7 +1188,7 @@ public function createTemplateRenderRequest($template_render_query, $apiKey = nu $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1214,12 +1214,11 @@ public function createTemplateRenderRequest($template_render_query, $apiKey = nu * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response + * @return void */ public function deleteTemplate($id, $apiKey = null) { - list($response) = $this->deleteTemplateWithHttpInfo($id, $apiKey); - return $response; + $this->deleteTemplateWithHttpInfo($id, $apiKey); } /** @@ -1231,7 +1230,7 @@ public function deleteTemplate($id, $apiKey = null) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of array|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response|\KlaviyoAPI\Model\GetCreateVariantsJobs400Response, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ public function deleteTemplateWithHttpInfo($id, $apiKey = null) { @@ -1272,103 +1271,10 @@ public function deleteTemplateWithHttpInfo($id, $apiKey = null) ); } - switch($statusCode) { - case 200: - if ('array' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('array<string,mixed>' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ('\KlaviyoAPI\Model\GetCreateVariantsJobs400Response' !== 'string') { - $content = json_decode($content); - } - } - - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'array'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'array', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1422,32 +1328,14 @@ function ($response) { */ public function deleteTemplateAsyncWithHttpInfo($id, $apiKey = null) { - $returnType = 'array'; + $returnType = ''; $request = $this->deleteTemplateRequest($id, $apiKey); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - $parsed_content = json_decode(json_encode($content), TRUE); - if (json_last_error() != JSON_ERROR_NONE) { - $parsed_content = $content; - } - - return [ - $parsed_content, - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1553,7 +1441,7 @@ public function deleteTemplateRequest($id, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1576,7 +1464,7 @@ public function deleteTemplateRequest($id, $apiKey = null) * Get Template * * @param string $id The ID of template (required) - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1594,7 +1482,7 @@ public function getTemplate($id, $fields_template = null, $apiKey = null) * Get Template * * @param string $id The ID of template (required) - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1763,7 +1651,7 @@ public function getTemplateWithHttpInfo($id, $fields_template = null, $apiKey = * Get Template * * @param string $id The ID of template (required) - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1784,7 +1672,7 @@ function ($response) { * Get Template * * @param string $id The ID of template (required) - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1839,7 +1727,7 @@ function ($exception) { * Create request for operation 'getTemplate' * * @param string $id The ID of template (required) - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1932,7 +1820,7 @@ public function getTemplateRequest($id, $fields_template = null, $apiKey = null) $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -1954,10 +1842,10 @@ public function getTemplateRequest($id, $fields_template = null, $apiKey = null) * * Get Templates * - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1974,10 +1862,10 @@ public function getTemplates($fields_template = null, $filter = null, $page_curs * * Get Templates * - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \KlaviyoAPI\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2145,10 +2033,10 @@ public function getTemplatesWithHttpInfo($fields_template = null, $filter = null * * Get Templates * - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2168,10 +2056,10 @@ function ($response) { * * Get Templates * - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2225,10 +2113,10 @@ function ($exception) { /** * Create request for operation 'getTemplates' * - * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sparse-fieldsets (optional) - * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) - * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#pagination (optional) - * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-06-15/reference/api-overview#sorting (optional) + * @param string[] $fields_template For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sparse-fieldsets (optional) + * @param string $filter For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` (optional) + * @param string $page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#pagination (optional) + * @param string $sort For more information please visit https://developers.klaviyo.com/en/v2023-07-15/reference/api-overview#sorting (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2334,7 +2222,7 @@ public function getTemplatesRequest($fields_template = null, $filter = null, $pa $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, @@ -2716,7 +2604,7 @@ public function updateTemplateRequest($id, $template_update_query, $apiKey = nul $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); } - $defaultHeaders['revision'] = ['2023-06-15']; + $defaultHeaders['revision'] = ['2023-07-15']; $headers = array_merge( $defaultHeaders, diff --git a/lib/ApiException.php b/lib/ApiException.php index f8795d6..5f3aed3 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Configuration.php b/lib/Configuration.php index 53d7942..8c0b31b 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -101,7 +101,7 @@ class Configuration * * @var string */ - protected $userAgent = 'klaviyo/api/4.0.0'; + protected $userAgent = 'klaviyo/api/5.0.0'; /** * Debug switch (default set to false) @@ -433,8 +433,8 @@ public static function toDebugReport() $report = 'PHP SDK (KlaviyoAPI) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' The version of the OpenAPI document: 2023-06-15' . PHP_EOL; - $report .= ' SDK Package Version: 4.0.0' . PHP_EOL; + $report .= ' The version of the OpenAPI document: 2023-07-15' . PHP_EOL; + $report .= ' SDK Package Version: 5.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index b4c6a56..3999f61 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -14,7 +14,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/AudiencesSubObject.php b/lib/Model/AudiencesSubObject.php index 950657d..5b7eff0 100644 --- a/lib/Model/AudiencesSubObject.php +++ b/lib/Model/AudiencesSubObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileUnsuppressionBulkCreateJobEnum.php b/lib/Model/BackInStockSubscriptionEnum.php similarity index 74% rename from lib/Model/ProfileUnsuppressionBulkCreateJobEnum.php rename to lib/Model/BackInStockSubscriptionEnum.php index 70757d9..7db7a38 100644 --- a/lib/Model/ProfileUnsuppressionBulkCreateJobEnum.php +++ b/lib/Model/BackInStockSubscriptionEnum.php @@ -1,6 +1,6 @@ 'string', - 'send_options' => '\KlaviyoAPI\Model\SendOptionsSubObject', + 'campaign_messages' => '\KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesCampaignMessages', + 'send_options' => '\KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesSendOptions', 'audiences' => '\KlaviyoAPI\Model\AudiencesSubObject', - 'tracking_options' => '\KlaviyoAPI\Model\TrackingOptionsSubObject', - 'channel' => 'string', + 'tracking_options' => '\KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesTrackingOptions', 'send_strategy' => '\KlaviyoAPI\Model\SendStrategySubObject' ]; @@ -75,10 +75,10 @@ class CampaignCreateQueryResourceObjectAttributes implements ModelInterface, Arr */ protected static $openAPIFormats = [ 'name' => null, + 'campaign_messages' => null, 'send_options' => null, 'audiences' => null, 'tracking_options' => null, - 'channel' => null, 'send_strategy' => null ]; @@ -110,10 +110,10 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'name' => 'name', + 'campaign_messages' => 'campaign-messages', 'send_options' => 'send_options', 'audiences' => 'audiences', 'tracking_options' => 'tracking_options', - 'channel' => 'channel', 'send_strategy' => 'send_strategy' ]; @@ -124,10 +124,10 @@ public static function openAPIFormats() */ protected static $setters = [ 'name' => 'setName', + 'campaign_messages' => 'setCampaignMessages', 'send_options' => 'setSendOptions', 'audiences' => 'setAudiences', 'tracking_options' => 'setTrackingOptions', - 'channel' => 'setChannel', 'send_strategy' => 'setSendStrategy' ]; @@ -138,10 +138,10 @@ public static function openAPIFormats() */ protected static $getters = [ 'name' => 'getName', + 'campaign_messages' => 'getCampaignMessages', 'send_options' => 'getSendOptions', 'audiences' => 'getAudiences', 'tracking_options' => 'getTrackingOptions', - 'channel' => 'getChannel', 'send_strategy' => 'getSendStrategy' ]; @@ -203,10 +203,10 @@ public function getModelName() public function __construct(array $data = null) { $this->container['name'] = $data['name'] ?? null; + $this->container['campaign_messages'] = $data['campaign_messages'] ?? null; $this->container['send_options'] = $data['send_options'] ?? null; $this->container['audiences'] = $data['audiences'] ?? null; $this->container['tracking_options'] = $data['tracking_options'] ?? null; - $this->container['channel'] = $data['channel'] ?? null; $this->container['send_strategy'] = $data['send_strategy'] ?? null; } @@ -222,15 +222,12 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ($this->container['send_options'] === null) { - $invalidProperties[] = "'send_options' can't be null"; + if ($this->container['campaign_messages'] === null) { + $invalidProperties[] = "'campaign_messages' can't be null"; } if ($this->container['audiences'] === null) { $invalidProperties[] = "'audiences' can't be null"; } - if ($this->container['channel'] === null) { - $invalidProperties[] = "'channel' can't be null"; - } if ($this->container['send_strategy'] === null) { $invalidProperties[] = "'send_strategy' can't be null"; } @@ -273,10 +270,34 @@ public function setName($name) return $this; } + /** + * Gets campaign_messages + * + * @return \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesCampaignMessages + */ + public function getCampaignMessages() + { + return $this->container['campaign_messages']; + } + + /** + * Sets campaign_messages + * + * @param \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesCampaignMessages $campaign_messages campaign_messages + * + * @return self + */ + public function setCampaignMessages($campaign_messages) + { + $this->container['campaign_messages'] = $campaign_messages; + + return $this; + } + /** * Gets send_options * - * @return \KlaviyoAPI\Model\SendOptionsSubObject + * @return \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesSendOptions|null */ public function getSendOptions() { @@ -286,7 +307,7 @@ public function getSendOptions() /** * Sets send_options * - * @param \KlaviyoAPI\Model\SendOptionsSubObject $send_options send_options + * @param \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesSendOptions|null $send_options send_options * * @return self */ @@ -324,7 +345,7 @@ public function setAudiences($audiences) /** * Gets tracking_options * - * @return \KlaviyoAPI\Model\TrackingOptionsSubObject|null + * @return \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesTrackingOptions|null */ public function getTrackingOptions() { @@ -334,7 +355,7 @@ public function getTrackingOptions() /** * Sets tracking_options * - * @param \KlaviyoAPI\Model\TrackingOptionsSubObject|null $tracking_options tracking_options + * @param \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesTrackingOptions|null $tracking_options tracking_options * * @return self */ @@ -345,30 +366,6 @@ public function setTrackingOptions($tracking_options) return $this; } - /** - * Gets channel - * - * @return string - */ - public function getChannel() - { - return $this->container['channel']; - } - - /** - * Sets channel - * - * @param string $channel The type of campaign (email or sms, for example) - * - * @return self - */ - public function setChannel($channel) - { - $this->container['channel'] = $channel; - - return $this; - } - /** * Gets send_strategy * diff --git a/lib/Model/CampaignCreateQueryResourceObjectAttributesCampaignMessages.php b/lib/Model/CampaignCreateQueryResourceObjectAttributesCampaignMessages.php new file mode 100644 index 0000000..59bb28d --- /dev/null +++ b/lib/Model/CampaignCreateQueryResourceObjectAttributesCampaignMessages.php @@ -0,0 +1,325 @@ + + */ +class CampaignCreateQueryResourceObjectAttributesCampaignMessages implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignCreateQueryResourceObject_attributes_campaign_messages'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignCreateQueryResourceObjectAttributesSendOptions.php b/lib/Model/CampaignCreateQueryResourceObjectAttributesSendOptions.php new file mode 100644 index 0000000..204367f --- /dev/null +++ b/lib/Model/CampaignCreateQueryResourceObjectAttributesSendOptions.php @@ -0,0 +1,322 @@ + + */ +class CampaignCreateQueryResourceObjectAttributesSendOptions implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignCreateQueryResourceObject_attributes_send_options'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'use_smart_sending' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'use_smart_sending' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'use_smart_sending' => 'use_smart_sending' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'use_smart_sending' => 'setUseSmartSending' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'use_smart_sending' => 'getUseSmartSending' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['use_smart_sending'] = $data['use_smart_sending'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets use_smart_sending + * + * @return bool|null + */ + public function getUseSmartSending() + { + return $this->container['use_smart_sending']; + } + + /** + * Sets use_smart_sending + * + * @param bool|null $use_smart_sending Use smart sending. Defaults to True + * + * @return self + */ + public function setUseSmartSending($use_smart_sending) + { + $this->container['use_smart_sending'] = $use_smart_sending; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignCreateQueryResourceObjectAttributesTrackingOptions.php b/lib/Model/CampaignCreateQueryResourceObjectAttributesTrackingOptions.php new file mode 100644 index 0000000..6dac33b --- /dev/null +++ b/lib/Model/CampaignCreateQueryResourceObjectAttributesTrackingOptions.php @@ -0,0 +1,412 @@ + + */ +class CampaignCreateQueryResourceObjectAttributesTrackingOptions implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignCreateQueryResourceObject_attributes_tracking_options'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'is_tracking_clicks' => 'bool', + 'utm_params' => '\KlaviyoAPI\Model\UTMParamsSubObject[]', + 'is_tracking_opens' => 'bool', + 'is_add_utm' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'is_tracking_clicks' => null, + 'utm_params' => null, + 'is_tracking_opens' => null, + 'is_add_utm' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'is_tracking_clicks' => 'is_tracking_clicks', + 'utm_params' => 'utm_params', + 'is_tracking_opens' => 'is_tracking_opens', + 'is_add_utm' => 'is_add_utm' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'is_tracking_clicks' => 'setIsTrackingClicks', + 'utm_params' => 'setUtmParams', + 'is_tracking_opens' => 'setIsTrackingOpens', + 'is_add_utm' => 'setIsAddUtm' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'is_tracking_clicks' => 'getIsTrackingClicks', + 'utm_params' => 'getUtmParams', + 'is_tracking_opens' => 'getIsTrackingOpens', + 'is_add_utm' => 'getIsAddUtm' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['is_tracking_clicks'] = $data['is_tracking_clicks'] ?? null; + $this->container['utm_params'] = $data['utm_params'] ?? null; + $this->container['is_tracking_opens'] = $data['is_tracking_opens'] ?? null; + $this->container['is_add_utm'] = $data['is_add_utm'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets is_tracking_clicks + * + * @return bool|null + */ + public function getIsTrackingClicks() + { + return $this->container['is_tracking_clicks']; + } + + /** + * Sets is_tracking_clicks + * + * @param bool|null $is_tracking_clicks Whether the campaign is tracking click events. If not specified, uses company defaults. + * + * @return self + */ + public function setIsTrackingClicks($is_tracking_clicks) + { + $this->container['is_tracking_clicks'] = $is_tracking_clicks; + + return $this; + } + + /** + * Gets utm_params + * + * @return \KlaviyoAPI\Model\UTMParamsSubObject[]|null + */ + public function getUtmParams() + { + return $this->container['utm_params']; + } + + /** + * Sets utm_params + * + * @param \KlaviyoAPI\Model\UTMParamsSubObject[]|null $utm_params A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults. + * + * @return self + */ + public function setUtmParams($utm_params) + { + $this->container['utm_params'] = $utm_params; + + return $this; + } + + /** + * Gets is_tracking_opens + * + * @return bool|null + */ + public function getIsTrackingOpens() + { + return $this->container['is_tracking_opens']; + } + + /** + * Sets is_tracking_opens + * + * @param bool|null $is_tracking_opens Whether the campaign is tracking open events. If not specified, uses company defaults. + * + * @return self + */ + public function setIsTrackingOpens($is_tracking_opens) + { + $this->container['is_tracking_opens'] = $is_tracking_opens; + + return $this; + } + + /** + * Gets is_add_utm + * + * @return bool|null + */ + public function getIsAddUtm() + { + return $this->container['is_add_utm']; + } + + /** + * Sets is_add_utm + * + * @param bool|null $is_add_utm Whether the campaign needs UTM parameters. If set to False, UTM params will not be used. + * + * @return self + */ + public function setIsAddUtm($is_add_utm) + { + $this->container['is_add_utm'] = $is_add_utm; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignEnum.php b/lib/Model/CampaignEnum.php index bacce3e..37a1303 100644 --- a/lib/Model/CampaignEnum.php +++ b/lib/Model/CampaignEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignMessageAssignTemplateQuery.php b/lib/Model/CampaignMessageAssignTemplateQuery.php index fc85432..a8d0371 100644 --- a/lib/Model/CampaignMessageAssignTemplateQuery.php +++ b/lib/Model/CampaignMessageAssignTemplateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignMessageAssignTemplateQueryResourceObject.php b/lib/Model/CampaignMessageAssignTemplateQueryResourceObject.php index 18de3d1..f51b75f 100644 --- a/lib/Model/CampaignMessageAssignTemplateQueryResourceObject.php +++ b/lib/Model/CampaignMessageAssignTemplateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,6 +58,7 @@ class CampaignMessageAssignTemplateQueryResourceObject implements ModelInterface * @var string[] */ protected static $openAPITypes = [ + 'relationships' => '\KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationships', 'attributes' => '\KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\CampaignMessageEnum' ]; @@ -70,6 +71,7 @@ class CampaignMessageAssignTemplateQueryResourceObject implements ModelInterface * @psalm-var array */ protected static $openAPIFormats = [ + 'relationships' => null, 'attributes' => null, 'type' => null ]; @@ -101,6 +103,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'relationships' => 'relationships', 'attributes' => 'attributes', 'type' => 'type' ]; @@ -111,6 +114,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'relationships' => 'setRelationships', 'attributes' => 'setAttributes', 'type' => 'setType' ]; @@ -121,6 +125,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'relationships' => 'getRelationships', 'attributes' => 'getAttributes', 'type' => 'getType' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['relationships'] = $data['relationships'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; $this->container['type'] = $data['type'] ?? null; } @@ -216,6 +222,30 @@ public function valid() } + /** + * Gets relationships + * + * @return \KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationships|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationships|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** * Gets attributes * diff --git a/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectAttributes.php b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectAttributes.php index abf2c3f..482fd81 100644 --- a/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectAttributes.php +++ b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,8 +58,7 @@ class CampaignMessageAssignTemplateQueryResourceObjectAttributes implements Mode * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'template_id' => 'string' + 'id' => 'string' ]; /** @@ -70,8 +69,7 @@ class CampaignMessageAssignTemplateQueryResourceObjectAttributes implements Mode * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'template_id' => null + 'id' => null ]; /** @@ -101,8 +99,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'template_id' => 'template_id' + 'id' => 'id' ]; /** @@ -111,8 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'template_id' => 'setTemplateId' + 'id' => 'setId' ]; /** @@ -121,8 +117,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'template_id' => 'getTemplateId' + 'id' => 'getId' ]; /** @@ -183,7 +178,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['id'] = $data['id'] ?? null; - $this->container['template_id'] = $data['template_id'] ?? null; } /** @@ -198,9 +192,6 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } - if ($this->container['template_id'] === null) { - $invalidProperties[] = "'template_id' can't be null"; - } return $invalidProperties; } @@ -239,30 +230,6 @@ public function setId($id) return $this; } - - /** - * Gets template_id - * - * @return string - */ - public function getTemplateId() - { - return $this->container['template_id']; - } - - /** - * Sets template_id - * - * @param string $template_id The template ID to assign - * - * @return self - */ - public function setTemplateId($template_id) - { - $this->container['template_id'] = $template_id; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationships.php b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationships.php new file mode 100644 index 0000000..79620af --- /dev/null +++ b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationships.php @@ -0,0 +1,321 @@ + + */ +class CampaignMessageAssignTemplateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignMessageAssignTemplateQueryResourceObject_relationships'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'template' => '\KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'template' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'template' => 'template' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'template' => 'setTemplate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'template' => 'getTemplate' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['template'] = $data['template'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets template + * + * @return \KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate|null + */ + public function getTemplate() + { + return $this->container['template']; + } + + /** + * Sets template + * + * @param \KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate|null $template template + * + * @return self + */ + public function setTemplate($template) + { + $this->container['template'] = $template; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate.php b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate.php new file mode 100644 index 0000000..d8ff941 --- /dev/null +++ b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate.php @@ -0,0 +1,324 @@ + + */ +class CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignMessageAssignTemplateQueryResourceObject_relationships_template'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData.php b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData.php new file mode 100644 index 0000000..2c234f1 --- /dev/null +++ b/lib/Model/CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData.php @@ -0,0 +1,389 @@ + + */ +class CampaignMessageAssignTemplateQueryResourceObjectRelationshipsTemplateData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignMessageAssignTemplateQueryResourceObject_relationships_template_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_TEMPLATE = 'template'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TEMPLATE, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UnsuppressionCreateJobCreateQueryResourceObject.php b/lib/Model/CampaignMessageCreateQueryResourceObject.php similarity index 88% rename from lib/Model/UnsuppressionCreateJobCreateQueryResourceObject.php rename to lib/Model/CampaignMessageCreateQueryResourceObject.php index 1ac85c2..1349a79 100644 --- a/lib/Model/UnsuppressionCreateJobCreateQueryResourceObject.php +++ b/lib/Model/CampaignMessageCreateQueryResourceObject.php @@ -1,6 +1,6 @@ */ -class UnsuppressionCreateJobCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +class CampaignMessageCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UnsuppressionCreateJobCreateQueryResourceObject implements ModelInterface, * * @var string */ - protected static $openAPIModelName = 'UnsuppressionCreateJobCreateQueryResourceObject'; + protected static $openAPIModelName = 'CampaignMessageCreateQueryResourceObject'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,8 +58,8 @@ class UnsuppressionCreateJobCreateQueryResourceObject implements ModelInterface, * @var string[] */ protected static $openAPITypes = [ - 'attributes' => '\KlaviyoAPI\Model\UnsuppressionCreateJobCreateQueryResourceObjectAttributes', - 'type' => '\KlaviyoAPI\Model\ProfileUnsuppressionBulkCreateJobEnum' + 'attributes' => '\KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\CampaignMessageEnum' ]; /** @@ -219,7 +219,7 @@ public function valid() /** * Gets attributes * - * @return \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQueryResourceObjectAttributes + * @return \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributes */ public function getAttributes() { @@ -229,7 +229,7 @@ public function getAttributes() /** * Sets attributes * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQueryResourceObjectAttributes $attributes attributes + * @param \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributes $attributes attributes * * @return self */ @@ -243,7 +243,7 @@ public function setAttributes($attributes) /** * Gets type * - * @return \KlaviyoAPI\Model\ProfileUnsuppressionBulkCreateJobEnum + * @return \KlaviyoAPI\Model\CampaignMessageEnum */ public function getType() { @@ -253,7 +253,7 @@ public function getType() /** * Sets type * - * @param \KlaviyoAPI\Model\ProfileUnsuppressionBulkCreateJobEnum $type type + * @param \KlaviyoAPI\Model\CampaignMessageEnum $type type * * @return self */ diff --git a/lib/Model/CampaignMessageCreateQueryResourceObjectAttributes.php b/lib/Model/CampaignMessageCreateQueryResourceObjectAttributes.php new file mode 100644 index 0000000..0b7e94c --- /dev/null +++ b/lib/Model/CampaignMessageCreateQueryResourceObjectAttributes.php @@ -0,0 +1,414 @@ + + */ +class CampaignMessageCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignMessageCreateQueryResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'content' => '\KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributesContent', + 'render_options' => '\KlaviyoAPI\Model\RenderOptionsSubObject', + 'channel' => 'string', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'content' => null, + 'render_options' => null, + 'channel' => null, + 'label' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'content' => 'content', + 'render_options' => 'render_options', + 'channel' => 'channel', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'content' => 'setContent', + 'render_options' => 'setRenderOptions', + 'channel' => 'setChannel', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'content' => 'getContent', + 'render_options' => 'getRenderOptions', + 'channel' => 'getChannel', + 'label' => 'getLabel' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['content'] = $data['content'] ?? null; + $this->container['render_options'] = $data['render_options'] ?? null; + $this->container['channel'] = $data['channel'] ?? null; + $this->container['label'] = $data['label'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributesContent|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributesContent|null $content content + * + * @return self + */ + public function setContent($content) + { + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets render_options + * + * @return \KlaviyoAPI\Model\RenderOptionsSubObject|null + */ + public function getRenderOptions() + { + return $this->container['render_options']; + } + + /** + * Sets render_options + * + * @param \KlaviyoAPI\Model\RenderOptionsSubObject|null $render_options render_options + * + * @return self + */ + public function setRenderOptions($render_options) + { + $this->container['render_options'] = $render_options; + + return $this; + } + + /** + * Gets channel + * + * @return string + */ + public function getChannel() + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param string $channel The channel the message is to be sent on (email or sms, for example) + * + * @return self + */ + public function setChannel($channel) + { + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel() + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label The label or name on the message + * + * @return self + */ + public function setLabel($label) + { + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignMessageCreateQueryResourceObjectAttributesContent.php b/lib/Model/CampaignMessageCreateQueryResourceObjectAttributesContent.php new file mode 100644 index 0000000..18200b7 --- /dev/null +++ b/lib/Model/CampaignMessageCreateQueryResourceObjectAttributesContent.php @@ -0,0 +1,442 @@ + + */ +class CampaignMessageCreateQueryResourceObjectAttributesContent implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CampaignMessageCreateQueryResourceObject_attributes_content'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'preview_text' => 'string', + 'from_email' => 'string', + 'from_label' => 'string', + 'subject' => 'string', + 'body' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'preview_text' => null, + 'from_email' => null, + 'from_label' => null, + 'subject' => null, + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'preview_text' => 'preview_text', + 'from_email' => 'from_email', + 'from_label' => 'from_label', + 'subject' => 'subject', + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'preview_text' => 'setPreviewText', + 'from_email' => 'setFromEmail', + 'from_label' => 'setFromLabel', + 'subject' => 'setSubject', + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'preview_text' => 'getPreviewText', + 'from_email' => 'getFromEmail', + 'from_label' => 'getFromLabel', + 'subject' => 'getSubject', + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['preview_text'] = $data['preview_text'] ?? null; + $this->container['from_email'] = $data['from_email'] ?? null; + $this->container['from_label'] = $data['from_label'] ?? null; + $this->container['subject'] = $data['subject'] ?? null; + $this->container['body'] = $data['body'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets preview_text + * + * @return string|null + */ + public function getPreviewText() + { + return $this->container['preview_text']; + } + + /** + * Sets preview_text + * + * @param string|null $preview_text Preview text associated with the message + * + * @return self + */ + public function setPreviewText($preview_text) + { + $this->container['preview_text'] = $preview_text; + + return $this; + } + + /** + * Gets from_email + * + * @return string|null + */ + public function getFromEmail() + { + return $this->container['from_email']; + } + + /** + * Sets from_email + * + * @param string|null $from_email The email the message should be sent from + * + * @return self + */ + public function setFromEmail($from_email) + { + $this->container['from_email'] = $from_email; + + return $this; + } + + /** + * Gets from_label + * + * @return string|null + */ + public function getFromLabel() + { + return $this->container['from_label']; + } + + /** + * Sets from_label + * + * @param string|null $from_label The label associated with the from_email + * + * @return self + */ + public function setFromLabel($from_label) + { + $this->container['from_label'] = $from_label; + + return $this; + } + + /** + * Gets subject + * + * @return string|null + */ + public function getSubject() + { + return $this->container['subject']; + } + + /** + * Sets subject + * + * @param string|null $subject The subject of the message + * + * @return self + */ + public function setSubject($subject) + { + $this->container['subject'] = $subject; + + return $this; + } + + /** + * Gets body + * + * @return string|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string|null $body The message body + * + * @return self + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CampaignMessageEnum.php b/lib/Model/CampaignMessageEnum.php index 976981a..59ce087 100644 --- a/lib/Model/CampaignMessageEnum.php +++ b/lib/Model/CampaignMessageEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignMessagePartialUpdateQuery.php b/lib/Model/CampaignMessagePartialUpdateQuery.php index e0f1ccf..0414595 100644 --- a/lib/Model/CampaignMessagePartialUpdateQuery.php +++ b/lib/Model/CampaignMessagePartialUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignMessagePartialUpdateQueryResourceObject.php b/lib/Model/CampaignMessagePartialUpdateQueryResourceObject.php index cc767b0..93f2bd7 100644 --- a/lib/Model/CampaignMessagePartialUpdateQueryResourceObject.php +++ b/lib/Model/CampaignMessagePartialUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignMessagePartialUpdateQueryResourceObjectAttributes.php b/lib/Model/CampaignMessagePartialUpdateQueryResourceObjectAttributes.php index b4204a9..cd86b30 100644 --- a/lib/Model/CampaignMessagePartialUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/CampaignMessagePartialUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,8 @@ class CampaignMessagePartialUpdateQueryResourceObjectAttributes implements Model * @var string[] */ protected static $openAPITypes = [ - 'content' => '\KlaviyoAPI\Model\ContentSubObject', + 'content' => '\KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributesContent', + 'render_options' => '\KlaviyoAPI\Model\RenderOptionsSubObject', 'label' => 'string' ]; @@ -71,6 +72,7 @@ class CampaignMessagePartialUpdateQueryResourceObjectAttributes implements Model */ protected static $openAPIFormats = [ 'content' => null, + 'render_options' => null, 'label' => null ]; @@ -102,6 +104,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'content' => 'content', + 'render_options' => 'render_options', 'label' => 'label' ]; @@ -112,6 +115,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'content' => 'setContent', + 'render_options' => 'setRenderOptions', 'label' => 'setLabel' ]; @@ -122,6 +126,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'content' => 'getContent', + 'render_options' => 'getRenderOptions', 'label' => 'getLabel' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['content'] = $data['content'] ?? null; + $this->container['render_options'] = $data['render_options'] ?? null; $this->container['label'] = $data['label'] ?? null; } @@ -213,7 +219,7 @@ public function valid() /** * Gets content * - * @return \KlaviyoAPI\Model\ContentSubObject|null + * @return \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributesContent|null */ public function getContent() { @@ -223,7 +229,7 @@ public function getContent() /** * Sets content * - * @param \KlaviyoAPI\Model\ContentSubObject|null $content content + * @param \KlaviyoAPI\Model\CampaignMessageCreateQueryResourceObjectAttributesContent|null $content content * * @return self */ @@ -234,6 +240,30 @@ public function setContent($content) return $this; } + /** + * Gets render_options + * + * @return \KlaviyoAPI\Model\RenderOptionsSubObject|null + */ + public function getRenderOptions() + { + return $this->container['render_options']; + } + + /** + * Sets render_options + * + * @param \KlaviyoAPI\Model\RenderOptionsSubObject|null $render_options render_options + * + * @return self + */ + public function setRenderOptions($render_options) + { + $this->container['render_options'] = $render_options; + + return $this; + } + /** * Gets label * diff --git a/lib/Model/CampaignPartialUpdateQuery.php b/lib/Model/CampaignPartialUpdateQuery.php index 178885a..e41191e 100644 --- a/lib/Model/CampaignPartialUpdateQuery.php +++ b/lib/Model/CampaignPartialUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignPartialUpdateQueryResourceObject.php b/lib/Model/CampaignPartialUpdateQueryResourceObject.php index 2ec5b11..3e0f4e3 100644 --- a/lib/Model/CampaignPartialUpdateQueryResourceObject.php +++ b/lib/Model/CampaignPartialUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignPartialUpdateQueryResourceObjectAttributes.php b/lib/Model/CampaignPartialUpdateQueryResourceObjectAttributes.php index 1f49000..d91ed25 100644 --- a/lib/Model/CampaignPartialUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/CampaignPartialUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,11 +58,11 @@ class CampaignPartialUpdateQueryResourceObjectAttributes implements ModelInterfa * @var string[] */ protected static $openAPITypes = [ - 'send_options' => '\KlaviyoAPI\Model\SendOptionsSubObject', + 'send_options' => '\KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesSendOptions', 'send_strategy' => '\KlaviyoAPI\Model\SendStrategySubObject', 'audiences' => '\KlaviyoAPI\Model\AudiencesSubObject', 'name' => 'string', - 'tracking_options' => '\KlaviyoAPI\Model\TrackingOptionsSubObject' + 'tracking_options' => '\KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesTrackingOptions' ]; /** @@ -231,7 +231,7 @@ public function valid() /** * Gets send_options * - * @return \KlaviyoAPI\Model\SendOptionsSubObject|null + * @return \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesSendOptions|null */ public function getSendOptions() { @@ -241,7 +241,7 @@ public function getSendOptions() /** * Sets send_options * - * @param \KlaviyoAPI\Model\SendOptionsSubObject|null $send_options send_options + * @param \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesSendOptions|null $send_options send_options * * @return self */ @@ -327,7 +327,7 @@ public function setName($name) /** * Gets tracking_options * - * @return \KlaviyoAPI\Model\TrackingOptionsSubObject|null + * @return \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesTrackingOptions|null */ public function getTrackingOptions() { @@ -337,7 +337,7 @@ public function getTrackingOptions() /** * Sets tracking_options * - * @param \KlaviyoAPI\Model\TrackingOptionsSubObject|null $tracking_options tracking_options + * @param \KlaviyoAPI\Model\CampaignCreateQueryResourceObjectAttributesTrackingOptions|null $tracking_options tracking_options * * @return self */ diff --git a/lib/Model/CampaignRecipientEstimationJobCreateQuery.php b/lib/Model/CampaignRecipientEstimationJobCreateQuery.php index 59c7fff..b68a2f9 100644 --- a/lib/Model/CampaignRecipientEstimationJobCreateQuery.php +++ b/lib/Model/CampaignRecipientEstimationJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObject.php b/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObject.php index 15ac469..ed28c65 100644 --- a/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObject.php +++ b/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObjectAttributes.php b/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObjectAttributes.php index 0345c63..4ad0b39 100644 --- a/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CampaignRecipientEstimationJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignRecipientEstimationJobEnum.php b/lib/Model/CampaignRecipientEstimationJobEnum.php index fcd994c..d19346e 100644 --- a/lib/Model/CampaignRecipientEstimationJobEnum.php +++ b/lib/Model/CampaignRecipientEstimationJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobCreateQuery.php b/lib/Model/CampaignSendJobCreateQuery.php index 93317ad..44f19eb 100644 --- a/lib/Model/CampaignSendJobCreateQuery.php +++ b/lib/Model/CampaignSendJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobCreateQueryResourceObject.php b/lib/Model/CampaignSendJobCreateQueryResourceObject.php index ebe7a6c..4bc2c14 100644 --- a/lib/Model/CampaignSendJobCreateQueryResourceObject.php +++ b/lib/Model/CampaignSendJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobCreateQueryResourceObjectAttributes.php b/lib/Model/CampaignSendJobCreateQueryResourceObjectAttributes.php index 8ec9254..c871bc8 100644 --- a/lib/Model/CampaignSendJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CampaignSendJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobEnum.php b/lib/Model/CampaignSendJobEnum.php index 5ca9098..8dde6de 100644 --- a/lib/Model/CampaignSendJobEnum.php +++ b/lib/Model/CampaignSendJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobPartialUpdateQuery.php b/lib/Model/CampaignSendJobPartialUpdateQuery.php index a518723..9604cac 100644 --- a/lib/Model/CampaignSendJobPartialUpdateQuery.php +++ b/lib/Model/CampaignSendJobPartialUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobPartialUpdateQueryResourceObject.php b/lib/Model/CampaignSendJobPartialUpdateQueryResourceObject.php index 0ca5f43..36c1d97 100644 --- a/lib/Model/CampaignSendJobPartialUpdateQueryResourceObject.php +++ b/lib/Model/CampaignSendJobPartialUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CampaignSendJobPartialUpdateQueryResourceObjectAttributes.php b/lib/Model/CampaignSendJobPartialUpdateQueryResourceObjectAttributes.php index 3ebdad2..9aecf68 100644 --- a/lib/Model/CampaignSendJobPartialUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/CampaignSendJobPartialUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryBulkCreateJobEnum.php b/lib/Model/CatalogCategoryBulkCreateJobEnum.php index 131fb4d..efb047b 100644 --- a/lib/Model/CatalogCategoryBulkCreateJobEnum.php +++ b/lib/Model/CatalogCategoryBulkCreateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryBulkDeleteJobEnum.php b/lib/Model/CatalogCategoryBulkDeleteJobEnum.php index 1289a2a..896c8db 100644 --- a/lib/Model/CatalogCategoryBulkDeleteJobEnum.php +++ b/lib/Model/CatalogCategoryBulkDeleteJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryBulkUpdateJobEnum.php b/lib/Model/CatalogCategoryBulkUpdateJobEnum.php index fc5806c..eb4aba3 100644 --- a/lib/Model/CatalogCategoryBulkUpdateJobEnum.php +++ b/lib/Model/CatalogCategoryBulkUpdateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryCreateJobCreateQuery.php b/lib/Model/CatalogCategoryCreateJobCreateQuery.php index 660ec90..32c10a6 100644 --- a/lib/Model/CatalogCategoryCreateJobCreateQuery.php +++ b/lib/Model/CatalogCategoryCreateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObject.php b/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObject.php index dd5899d..e1c8eb9 100644 --- a/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributes.php index 39c6b0b..4136088 100644 --- a/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogCategoryCreateJobCreateQueryResourceObjectAttributes implements Mod * @var string[] */ protected static $openAPITypes = [ - 'categories' => '\KlaviyoAPI\Model\CatalogCategoryCreateQueryResourceObject[]' + 'categories' => '\KlaviyoAPI\Model\CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets categories * - * @return \KlaviyoAPI\Model\CatalogCategoryCreateQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories */ public function getCategories() { @@ -220,7 +220,7 @@ public function getCategories() /** * Sets categories * - * @param \KlaviyoAPI\Model\CatalogCategoryCreateQueryResourceObject[] $categories Array of catalog categories to create. + * @param \KlaviyoAPI\Model\CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories $categories categories * * @return self */ diff --git a/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories.php b/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories.php new file mode 100644 index 0000000..c19158a --- /dev/null +++ b/lib/Model/CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories.php @@ -0,0 +1,325 @@ + + */ +class CatalogCategoryCreateJobCreateQueryResourceObjectAttributesCategories implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogCategoryCreateJobCreateQueryResourceObject_attributes_categories'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogCategoryCreateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogCategoryCreateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogCategoryCreateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogCategoryCreateQuery.php b/lib/Model/CatalogCategoryCreateQuery.php index 8693eef..060d6ff 100644 --- a/lib/Model/CatalogCategoryCreateQuery.php +++ b/lib/Model/CatalogCategoryCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryCreateQueryResourceObject.php b/lib/Model/CatalogCategoryCreateQueryResourceObject.php index 6b98e1a..0ce750a 100644 --- a/lib/Model/CatalogCategoryCreateQueryResourceObject.php +++ b/lib/Model/CatalogCategoryCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogCategoryCreateQueryResourceObjectAttributes.php index bdb69a9..3acc499 100644 --- a/lib/Model/CatalogCategoryCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogCategoryCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -208,7 +208,7 @@ public function __construct(array $data = null) $this->container['catalog_type'] = $data['catalog_type'] ?? '$default'; $this->container['external_id'] = $data['external_id'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['integration_type'] = $data['integration_type'] ?? null; + $this->container['integration_type'] = $data['integration_type'] ?? '$custom'; } /** diff --git a/lib/Model/CatalogCategoryDeleteJobCreateQuery.php b/lib/Model/CatalogCategoryDeleteJobCreateQuery.php index dcb0f5d..7d201b3 100644 --- a/lib/Model/CatalogCategoryDeleteJobCreateQuery.php +++ b/lib/Model/CatalogCategoryDeleteJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObject.php b/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObject.php index 8282ad7..966c772 100644 --- a/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributes.php index c681224..74595f1 100644 --- a/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogCategoryDeleteJobCreateQueryResourceObjectAttributes implements Mod * @var string[] */ protected static $openAPITypes = [ - 'categories' => '\KlaviyoAPI\Model\CatalogCategoryDeleteQueryResourceObject[]' + 'categories' => '\KlaviyoAPI\Model\CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets categories * - * @return \KlaviyoAPI\Model\CatalogCategoryDeleteQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories */ public function getCategories() { @@ -220,7 +220,7 @@ public function getCategories() /** * Sets categories * - * @param \KlaviyoAPI\Model\CatalogCategoryDeleteQueryResourceObject[] $categories Array of catalog categories to delete. + * @param \KlaviyoAPI\Model\CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories $categories categories * * @return self */ diff --git a/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories.php b/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories.php new file mode 100644 index 0000000..e161b30 --- /dev/null +++ b/lib/Model/CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories.php @@ -0,0 +1,325 @@ + + */ +class CatalogCategoryDeleteJobCreateQueryResourceObjectAttributesCategories implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogCategoryDeleteJobCreateQueryResourceObject_attributes_categories'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogCategoryDeleteQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogCategoryDeleteQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogCategoryDeleteQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogCategoryDeleteQueryResourceObject.php b/lib/Model/CatalogCategoryDeleteQueryResourceObject.php index f9bc606..65ec8c3 100644 --- a/lib/Model/CatalogCategoryDeleteQueryResourceObject.php +++ b/lib/Model/CatalogCategoryDeleteQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryEnum.php b/lib/Model/CatalogCategoryEnum.php index 71d2146..b0e171b 100644 --- a/lib/Model/CatalogCategoryEnum.php +++ b/lib/Model/CatalogCategoryEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryItemOp.php b/lib/Model/CatalogCategoryItemOp.php index 14d6ae3..6f5f973 100644 --- a/lib/Model/CatalogCategoryItemOp.php +++ b/lib/Model/CatalogCategoryItemOp.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogCategoryItemOp implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\CatalogCategoryItemOpDataInner[]' + 'data' => '\KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner[]' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\CatalogCategoryItemOpDataInner[] + * @return \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner[] */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\CatalogCategoryItemOpDataInner[] $data data + * @param \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner[] $data data * * @return self */ diff --git a/lib/Model/CatalogCategoryUpdateJobCreateQuery.php b/lib/Model/CatalogCategoryUpdateJobCreateQuery.php index 84ba7bb..7e28b38 100644 --- a/lib/Model/CatalogCategoryUpdateJobCreateQuery.php +++ b/lib/Model/CatalogCategoryUpdateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObject.php b/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObject.php index 4673c2c..81d5992 100644 --- a/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributes.php index 14457dd..fdd2ae7 100644 --- a/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogCategoryUpdateJobCreateQueryResourceObjectAttributes implements Mod * @var string[] */ protected static $openAPITypes = [ - 'categories' => '\KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObject[]' + 'categories' => '\KlaviyoAPI\Model\CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets categories * - * @return \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories */ public function getCategories() { @@ -220,7 +220,7 @@ public function getCategories() /** * Sets categories * - * @param \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObject[] $categories Array of catalog categories to update. + * @param \KlaviyoAPI\Model\CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories $categories categories * * @return self */ diff --git a/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories.php b/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories.php new file mode 100644 index 0000000..c3a42e1 --- /dev/null +++ b/lib/Model/CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories.php @@ -0,0 +1,325 @@ + + */ +class CatalogCategoryUpdateJobCreateQueryResourceObjectAttributesCategories implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogCategoryUpdateJobCreateQueryResourceObject_attributes_categories'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogCategoryUpdateQuery.php b/lib/Model/CatalogCategoryUpdateQuery.php index eddaebf..26bb592 100644 --- a/lib/Model/CatalogCategoryUpdateQuery.php +++ b/lib/Model/CatalogCategoryUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryUpdateQueryResourceObject.php b/lib/Model/CatalogCategoryUpdateQueryResourceObject.php index ba86035..0e9d223 100644 --- a/lib/Model/CatalogCategoryUpdateQueryResourceObject.php +++ b/lib/Model/CatalogCategoryUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryUpdateQueryResourceObjectAttributes.php b/lib/Model/CatalogCategoryUpdateQueryResourceObjectAttributes.php index 7fa3411..e1ddeb3 100644 --- a/lib/Model/CatalogCategoryUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogCategoryUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationships.php b/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationships.php index d73d8d3..dcf321d 100644 --- a/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationships.php +++ b/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationships.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItems.php b/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItems.php index 6c61ac6..fb10647 100644 --- a/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItems.php +++ b/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItems.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogCategoryUpdateQueryResourceObjectRelationshipsItems implements Mode * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\CatalogCategoryItemOpDataInner[]' + 'data' => '\KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner[]' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\CatalogCategoryItemOpDataInner[] + * @return \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner[] */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\CatalogCategoryItemOpDataInner[] $data data + * @param \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner[] $data data * * @return self */ diff --git a/lib/Model/CatalogCategoryItemOpDataInner.php b/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner.php similarity index 94% rename from lib/Model/CatalogCategoryItemOpDataInner.php rename to lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner.php index 6d81e3f..5ad992f 100644 --- a/lib/Model/CatalogCategoryItemOpDataInner.php +++ b/lib/Model/CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner.php @@ -1,6 +1,6 @@ */ -class CatalogCategoryItemOpDataInner implements ModelInterface, ArrayAccess, \JsonSerializable +class CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class CatalogCategoryItemOpDataInner implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openAPIModelName = 'CatalogCategoryItemOp_data_inner'; + protected static $openAPIModelName = 'CatalogCategoryUpdateQueryResourceObject_relationships_items_data_inner'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/CatalogItemBulkCreateJobEnum.php b/lib/Model/CatalogItemBulkCreateJobEnum.php index 79cf32f..503ca55 100644 --- a/lib/Model/CatalogItemBulkCreateJobEnum.php +++ b/lib/Model/CatalogItemBulkCreateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemBulkDeleteJobEnum.php b/lib/Model/CatalogItemBulkDeleteJobEnum.php index 8955500..0b01999 100644 --- a/lib/Model/CatalogItemBulkDeleteJobEnum.php +++ b/lib/Model/CatalogItemBulkDeleteJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemBulkUpdateJobEnum.php b/lib/Model/CatalogItemBulkUpdateJobEnum.php index 653fb48..a200cac 100644 --- a/lib/Model/CatalogItemBulkUpdateJobEnum.php +++ b/lib/Model/CatalogItemBulkUpdateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemCategoryOp.php b/lib/Model/CatalogItemCategoryOp.php index 2bd974e..e7c1e37 100644 --- a/lib/Model/CatalogItemCategoryOp.php +++ b/lib/Model/CatalogItemCategoryOp.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogItemCategoryOp implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\CatalogItemCategoryOpDataInner[]' + 'data' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner[]' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\CatalogItemCategoryOpDataInner[] + * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner[] */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\CatalogItemCategoryOpDataInner[] $data data + * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner[] $data data * * @return self */ diff --git a/lib/Model/CatalogItemCreateJobCreateQuery.php b/lib/Model/CatalogItemCreateJobCreateQuery.php index 597f997..22b7950 100644 --- a/lib/Model/CatalogItemCreateJobCreateQuery.php +++ b/lib/Model/CatalogItemCreateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemCreateJobCreateQueryResourceObject.php b/lib/Model/CatalogItemCreateJobCreateQueryResourceObject.php index ddf2512..4a2e8f1 100644 --- a/lib/Model/CatalogItemCreateJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogItemCreateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributes.php index 6dea235..030d8c2 100644 --- a/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogItemCreateJobCreateQueryResourceObjectAttributes implements ModelIn * @var string[] */ protected static $openAPITypes = [ - 'items' => '\KlaviyoAPI\Model\CatalogItemCreateQueryResourceObject[]' + 'items' => '\KlaviyoAPI\Model\CatalogItemCreateJobCreateQueryResourceObjectAttributesItems' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets items * - * @return \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogItemCreateJobCreateQueryResourceObjectAttributesItems */ public function getItems() { @@ -220,7 +220,7 @@ public function getItems() /** * Sets items * - * @param \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObject[] $items Array of catalog items to create. + * @param \KlaviyoAPI\Model\CatalogItemCreateJobCreateQueryResourceObjectAttributesItems $items items * * @return self */ diff --git a/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributesItems.php b/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributesItems.php new file mode 100644 index 0000000..f88ea08 --- /dev/null +++ b/lib/Model/CatalogItemCreateJobCreateQueryResourceObjectAttributesItems.php @@ -0,0 +1,325 @@ + + */ +class CatalogItemCreateJobCreateQueryResourceObjectAttributesItems implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogItemCreateJobCreateQueryResourceObject_attributes_items'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogItemCreateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogItemCreateQuery.php b/lib/Model/CatalogItemCreateQuery.php index 0c9dc66..d680cb5 100644 --- a/lib/Model/CatalogItemCreateQuery.php +++ b/lib/Model/CatalogItemCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemCreateQueryResourceObject.php b/lib/Model/CatalogItemCreateQueryResourceObject.php index 3123d08..7d9cc78 100644 --- a/lib/Model/CatalogItemCreateQueryResourceObject.php +++ b/lib/Model/CatalogItemCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogItemCreateQueryResourceObject implements ModelInterface, ArrayAcces * @var string[] */ protected static $openAPITypes = [ - 'relationships' => '\KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationships', + 'relationships' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationships', 'attributes' => '\KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\CatalogItemEnum' ]; @@ -225,7 +225,7 @@ public function valid() /** * Gets relationships * - * @return \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationships|null + * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationships|null */ public function getRelationships() { @@ -235,7 +235,7 @@ public function getRelationships() /** * Sets relationships * - * @param \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationships|null $relationships relationships + * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationships|null $relationships relationships * * @return self */ diff --git a/lib/Model/CatalogItemCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogItemCreateQueryResourceObjectAttributes.php index 581e116..75033a8 100644 --- a/lib/Model/CatalogItemCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogItemCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -256,7 +256,7 @@ public function __construct(array $data = null) $this->container['images'] = $data['images'] ?? null; $this->container['image_thumbnail_url'] = $data['image_thumbnail_url'] ?? null; $this->container['external_id'] = $data['external_id'] ?? null; - $this->container['integration_type'] = $data['integration_type'] ?? null; + $this->container['integration_type'] = $data['integration_type'] ?? '$custom'; } /** diff --git a/lib/Model/CatalogItemDeleteJobCreateQuery.php b/lib/Model/CatalogItemDeleteJobCreateQuery.php index 792b62c..9c4d454 100644 --- a/lib/Model/CatalogItemDeleteJobCreateQuery.php +++ b/lib/Model/CatalogItemDeleteJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemDeleteJobCreateQueryResourceObject.php b/lib/Model/CatalogItemDeleteJobCreateQueryResourceObject.php index edbcf5d..adf7dcb 100644 --- a/lib/Model/CatalogItemDeleteJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogItemDeleteJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributes.php index 3c179e8..69238da 100644 --- a/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogItemDeleteJobCreateQueryResourceObjectAttributes implements ModelIn * @var string[] */ protected static $openAPITypes = [ - 'items' => '\KlaviyoAPI\Model\CatalogItemDeleteQueryResourceObject[]' + 'items' => '\KlaviyoAPI\Model\CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets items * - * @return \KlaviyoAPI\Model\CatalogItemDeleteQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems */ public function getItems() { @@ -220,7 +220,7 @@ public function getItems() /** * Sets items * - * @param \KlaviyoAPI\Model\CatalogItemDeleteQueryResourceObject[] $items Array of catalog items to delete. + * @param \KlaviyoAPI\Model\CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems $items items * * @return self */ diff --git a/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems.php b/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems.php new file mode 100644 index 0000000..f57b854 --- /dev/null +++ b/lib/Model/CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems.php @@ -0,0 +1,325 @@ + + */ +class CatalogItemDeleteJobCreateQueryResourceObjectAttributesItems implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogItemDeleteJobCreateQueryResourceObject_attributes_items'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogItemDeleteQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogItemDeleteQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogItemDeleteQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogItemDeleteQueryResourceObject.php b/lib/Model/CatalogItemDeleteQueryResourceObject.php index d4580ac..dba5446 100644 --- a/lib/Model/CatalogItemDeleteQueryResourceObject.php +++ b/lib/Model/CatalogItemDeleteQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemEnum.php b/lib/Model/CatalogItemEnum.php index 518c25c..dfc4140 100644 --- a/lib/Model/CatalogItemEnum.php +++ b/lib/Model/CatalogItemEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemUpdateJobCreateQuery.php b/lib/Model/CatalogItemUpdateJobCreateQuery.php index bb8b756..e91f19b 100644 --- a/lib/Model/CatalogItemUpdateJobCreateQuery.php +++ b/lib/Model/CatalogItemUpdateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemUpdateJobCreateQueryResourceObject.php b/lib/Model/CatalogItemUpdateJobCreateQueryResourceObject.php index 818fb76..6603b9f 100644 --- a/lib/Model/CatalogItemUpdateJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogItemUpdateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributes.php index d70b46f..46b3d9f 100644 --- a/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogItemUpdateJobCreateQueryResourceObjectAttributes implements ModelIn * @var string[] */ protected static $openAPITypes = [ - 'items' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObject[]' + 'items' => '\KlaviyoAPI\Model\CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets items * - * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems */ public function getItems() { @@ -220,7 +220,7 @@ public function getItems() /** * Sets items * - * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObject[] $items Array of catalog items to update. + * @param \KlaviyoAPI\Model\CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems $items items * * @return self */ diff --git a/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems.php b/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems.php new file mode 100644 index 0000000..43fd214 --- /dev/null +++ b/lib/Model/CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems.php @@ -0,0 +1,325 @@ + + */ +class CatalogItemUpdateJobCreateQueryResourceObjectAttributesItems implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogItemUpdateJobCreateQueryResourceObject_attributes_items'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogItemUpdateQuery.php b/lib/Model/CatalogItemUpdateQuery.php index ad3c760..0628ddd 100644 --- a/lib/Model/CatalogItemUpdateQuery.php +++ b/lib/Model/CatalogItemUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemUpdateQueryResourceObject.php b/lib/Model/CatalogItemUpdateQueryResourceObject.php index 20a73e7..354c83f 100644 --- a/lib/Model/CatalogItemUpdateQueryResourceObject.php +++ b/lib/Model/CatalogItemUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogItemUpdateQueryResourceObject implements ModelInterface, ArrayAcces * @var string[] */ protected static $openAPITypes = [ - 'relationships' => '\KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationships', + 'relationships' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationships', 'attributes' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\CatalogItemEnum', 'id' => 'string' @@ -234,7 +234,7 @@ public function valid() /** * Gets relationships * - * @return \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationships|null + * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationships|null */ public function getRelationships() { @@ -244,7 +244,7 @@ public function getRelationships() /** * Sets relationships * - * @param \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationships|null $relationships relationships + * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationships|null $relationships relationships * * @return self */ diff --git a/lib/Model/CatalogItemUpdateQueryResourceObjectAttributes.php b/lib/Model/CatalogItemUpdateQueryResourceObjectAttributes.php index e4fe4c7..b6e64d3 100644 --- a/lib/Model/CatalogItemUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogItemUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogItemCreateQueryResourceObjectRelationships.php b/lib/Model/CatalogItemUpdateQueryResourceObjectRelationships.php similarity index 93% rename from lib/Model/CatalogItemCreateQueryResourceObjectRelationships.php rename to lib/Model/CatalogItemUpdateQueryResourceObjectRelationships.php index f2089dd..ec9f8b1 100644 --- a/lib/Model/CatalogItemCreateQueryResourceObjectRelationships.php +++ b/lib/Model/CatalogItemUpdateQueryResourceObjectRelationships.php @@ -1,6 +1,6 @@ */ -class CatalogItemCreateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable +class CatalogItemUpdateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class CatalogItemCreateQueryResourceObjectRelationships implements ModelInterfac * * @var string */ - protected static $openAPIModelName = 'CatalogItemCreateQueryResourceObject_relationships'; + protected static $openAPIModelName = 'CatalogItemUpdateQueryResourceObject_relationships'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class CatalogItemCreateQueryResourceObjectRelationships implements ModelInterfac * @var string[] */ protected static $openAPITypes = [ - 'categories' => '\KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationshipsCategories' + 'categories' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategories' ]; /** @@ -207,7 +207,7 @@ public function valid() /** * Gets categories * - * @return \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationshipsCategories|null + * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategories|null */ public function getCategories() { @@ -217,7 +217,7 @@ public function getCategories() /** * Sets categories * - * @param \KlaviyoAPI\Model\CatalogItemCreateQueryResourceObjectRelationshipsCategories|null $categories categories + * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategories|null $categories categories * * @return self */ diff --git a/lib/Model/CatalogItemCreateQueryResourceObjectRelationshipsCategories.php b/lib/Model/CatalogItemUpdateQueryResourceObjectRelationshipsCategories.php similarity index 91% rename from lib/Model/CatalogItemCreateQueryResourceObjectRelationshipsCategories.php rename to lib/Model/CatalogItemUpdateQueryResourceObjectRelationshipsCategories.php index d73eeb0..f7c6be8 100644 --- a/lib/Model/CatalogItemCreateQueryResourceObjectRelationshipsCategories.php +++ b/lib/Model/CatalogItemUpdateQueryResourceObjectRelationshipsCategories.php @@ -1,6 +1,6 @@ */ -class CatalogItemCreateQueryResourceObjectRelationshipsCategories implements ModelInterface, ArrayAccess, \JsonSerializable +class CatalogItemUpdateQueryResourceObjectRelationshipsCategories implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class CatalogItemCreateQueryResourceObjectRelationshipsCategories implements Mod * * @var string */ - protected static $openAPIModelName = 'CatalogItemCreateQueryResourceObject_relationships_categories'; + protected static $openAPIModelName = 'CatalogItemUpdateQueryResourceObject_relationships_categories'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class CatalogItemCreateQueryResourceObjectRelationshipsCategories implements Mod * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\CatalogItemCategoryOpDataInner[]' + 'data' => '\KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner[]' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\CatalogItemCategoryOpDataInner[] + * @return \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner[] */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\CatalogItemCategoryOpDataInner[] $data data + * @param \KlaviyoAPI\Model\CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner[] $data data * * @return self */ diff --git a/lib/Model/CatalogItemCategoryOpDataInner.php b/lib/Model/CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner.php similarity index 94% rename from lib/Model/CatalogItemCategoryOpDataInner.php rename to lib/Model/CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner.php index 056525d..39d09f1 100644 --- a/lib/Model/CatalogItemCategoryOpDataInner.php +++ b/lib/Model/CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner.php @@ -1,6 +1,6 @@ */ -class CatalogItemCategoryOpDataInner implements ModelInterface, ArrayAccess, \JsonSerializable +class CatalogItemUpdateQueryResourceObjectRelationshipsCategoriesDataInner implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class CatalogItemCategoryOpDataInner implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openAPIModelName = 'CatalogItemCategoryOp_data_inner'; + protected static $openAPIModelName = 'CatalogItemUpdateQueryResourceObject_relationships_categories_data_inner'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/CatalogVariantBulkCreateJobEnum.php b/lib/Model/CatalogVariantBulkCreateJobEnum.php index 1d64055..a0dcad9 100644 --- a/lib/Model/CatalogVariantBulkCreateJobEnum.php +++ b/lib/Model/CatalogVariantBulkCreateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantBulkDeleteJobEnum.php b/lib/Model/CatalogVariantBulkDeleteJobEnum.php index d54e063..68ff0b1 100644 --- a/lib/Model/CatalogVariantBulkDeleteJobEnum.php +++ b/lib/Model/CatalogVariantBulkDeleteJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantBulkUpdateJobEnum.php b/lib/Model/CatalogVariantBulkUpdateJobEnum.php index 2e2c838..faaf8d8 100644 --- a/lib/Model/CatalogVariantBulkUpdateJobEnum.php +++ b/lib/Model/CatalogVariantBulkUpdateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantCreateJobCreateQuery.php b/lib/Model/CatalogVariantCreateJobCreateQuery.php index 180c09a..013269e 100644 --- a/lib/Model/CatalogVariantCreateJobCreateQuery.php +++ b/lib/Model/CatalogVariantCreateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantCreateJobCreateQueryResourceObject.php b/lib/Model/CatalogVariantCreateJobCreateQueryResourceObject.php index 7455237..404cfc0 100644 --- a/lib/Model/CatalogVariantCreateJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogVariantCreateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributes.php index a4a3a9a..797f5ed 100644 --- a/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogVariantCreateJobCreateQueryResourceObjectAttributes implements Mode * @var string[] */ protected static $openAPITypes = [ - 'variants' => '\KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObject[]' + 'variants' => '\KlaviyoAPI\Model\CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets variants * - * @return \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants */ public function getVariants() { @@ -220,7 +220,7 @@ public function getVariants() /** * Sets variants * - * @param \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObject[] $variants Array of catalog variants to create. + * @param \KlaviyoAPI\Model\CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants $variants variants * * @return self */ diff --git a/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants.php b/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants.php new file mode 100644 index 0000000..21de0e7 --- /dev/null +++ b/lib/Model/CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants.php @@ -0,0 +1,325 @@ + + */ +class CatalogVariantCreateJobCreateQueryResourceObjectAttributesVariants implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogVariantCreateJobCreateQueryResourceObject_attributes_variants'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogVariantCreateQuery.php b/lib/Model/CatalogVariantCreateQuery.php index 973d577..b68a061 100644 --- a/lib/Model/CatalogVariantCreateQuery.php +++ b/lib/Model/CatalogVariantCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantCreateQueryResourceObject.php b/lib/Model/CatalogVariantCreateQueryResourceObject.php index bce7bb6..bcbe837 100644 --- a/lib/Model/CatalogVariantCreateQueryResourceObject.php +++ b/lib/Model/CatalogVariantCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogVariantCreateQueryResourceObject implements ModelInterface, ArrayAc * @var string[] */ protected static $openAPITypes = [ - 'relationships' => '\KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationships', + 'relationships' => '\KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectRelationships', 'attributes' => '\KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\CatalogVariantEnum' ]; @@ -225,7 +225,7 @@ public function valid() /** * Gets relationships * - * @return \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationships|null + * @return \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectRelationships|null */ public function getRelationships() { @@ -235,7 +235,7 @@ public function getRelationships() /** * Sets relationships * - * @param \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationships|null $relationships relationships + * @param \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectRelationships|null $relationships relationships * * @return self */ diff --git a/lib/Model/CatalogVariantCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogVariantCreateQueryResourceObjectAttributes.php index bd67de3..2901ba3 100644 --- a/lib/Model/CatalogVariantCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogVariantCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -291,7 +291,7 @@ public function __construct(array $data = null) $this->container['images'] = $data['images'] ?? null; $this->container['image_thumbnail_url'] = $data['image_thumbnail_url'] ?? null; $this->container['external_id'] = $data['external_id'] ?? null; - $this->container['integration_type'] = $data['integration_type'] ?? null; + $this->container['integration_type'] = $data['integration_type'] ?? '$custom'; } /** diff --git a/lib/Model/CatalogVariantCreateQueryResourceObjectRelationships.php b/lib/Model/CatalogVariantCreateQueryResourceObjectRelationships.php new file mode 100644 index 0000000..859381d --- /dev/null +++ b/lib/Model/CatalogVariantCreateQueryResourceObjectRelationships.php @@ -0,0 +1,321 @@ + + */ +class CatalogVariantCreateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogVariantCreateQueryResourceObject_relationships'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'item' => '\KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectRelationshipsItem' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'item' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'item' => 'item' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'item' => 'setItem' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'item' => 'getItem' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['item'] = $data['item'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets item + * + * @return \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectRelationshipsItem|null + */ + public function getItem() + { + return $this->container['item']; + } + + /** + * Sets item + * + * @param \KlaviyoAPI\Model\CatalogVariantCreateQueryResourceObjectRelationshipsItem|null $item item + * + * @return self + */ + public function setItem($item) + { + $this->container['item'] = $item; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogVariantCreateQueryResourceObjectRelationshipsItem.php b/lib/Model/CatalogVariantCreateQueryResourceObjectRelationshipsItem.php new file mode 100644 index 0000000..e90a389 --- /dev/null +++ b/lib/Model/CatalogVariantCreateQueryResourceObjectRelationshipsItem.php @@ -0,0 +1,324 @@ + + */ +class CatalogVariantCreateQueryResourceObjectRelationshipsItem implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogVariantCreateQueryResourceObject_relationships_item'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogCategoryUpdateQueryResourceObjectRelationshipsItemsDataInner $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogVariantDeleteJobCreateQuery.php b/lib/Model/CatalogVariantDeleteJobCreateQuery.php index 5c7b714..e8c7944 100644 --- a/lib/Model/CatalogVariantDeleteJobCreateQuery.php +++ b/lib/Model/CatalogVariantDeleteJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObject.php b/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObject.php index 48488db..a78a0fa 100644 --- a/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributes.php index 0e7ebf8..b74903f 100644 --- a/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogVariantDeleteJobCreateQueryResourceObjectAttributes implements Mode * @var string[] */ protected static $openAPITypes = [ - 'variants' => '\KlaviyoAPI\Model\CatalogVariantDeleteQueryResourceObject[]' + 'variants' => '\KlaviyoAPI\Model\CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets variants * - * @return \KlaviyoAPI\Model\CatalogVariantDeleteQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants */ public function getVariants() { @@ -220,7 +220,7 @@ public function getVariants() /** * Sets variants * - * @param \KlaviyoAPI\Model\CatalogVariantDeleteQueryResourceObject[] $variants Array of catalog variants to delete. + * @param \KlaviyoAPI\Model\CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants $variants variants * * @return self */ diff --git a/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants.php b/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants.php new file mode 100644 index 0000000..1b9b5e0 --- /dev/null +++ b/lib/Model/CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants.php @@ -0,0 +1,325 @@ + + */ +class CatalogVariantDeleteJobCreateQueryResourceObjectAttributesVariants implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogVariantDeleteJobCreateQueryResourceObject_attributes_variants'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogVariantDeleteQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogVariantDeleteQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogVariantDeleteQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogVariantDeleteQueryResourceObject.php b/lib/Model/CatalogVariantDeleteQueryResourceObject.php index 9b93521..7f5a7db 100644 --- a/lib/Model/CatalogVariantDeleteQueryResourceObject.php +++ b/lib/Model/CatalogVariantDeleteQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantEnum.php b/lib/Model/CatalogVariantEnum.php index 2aa88b7..1d12b88 100644 --- a/lib/Model/CatalogVariantEnum.php +++ b/lib/Model/CatalogVariantEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantUpdateJobCreateQuery.php b/lib/Model/CatalogVariantUpdateJobCreateQuery.php index 8d47e18..051ff18 100644 --- a/lib/Model/CatalogVariantUpdateJobCreateQuery.php +++ b/lib/Model/CatalogVariantUpdateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObject.php b/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObject.php index eb4cf11..b09bfb3 100644 --- a/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObject.php +++ b/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributes.php b/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributes.php index 58f3a57..2bae7c2 100644 --- a/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class CatalogVariantUpdateJobCreateQueryResourceObjectAttributes implements Mode * @var string[] */ protected static $openAPITypes = [ - 'variants' => '\KlaviyoAPI\Model\CatalogVariantUpdateQueryResourceObject[]' + 'variants' => '\KlaviyoAPI\Model\CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets variants * - * @return \KlaviyoAPI\Model\CatalogVariantUpdateQueryResourceObject[] + * @return \KlaviyoAPI\Model\CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants */ public function getVariants() { @@ -220,7 +220,7 @@ public function getVariants() /** * Sets variants * - * @param \KlaviyoAPI\Model\CatalogVariantUpdateQueryResourceObject[] $variants Array of catalog variants to update. + * @param \KlaviyoAPI\Model\CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants $variants variants * * @return self */ diff --git a/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants.php b/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants.php new file mode 100644 index 0000000..2bcdbeb --- /dev/null +++ b/lib/Model/CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants.php @@ -0,0 +1,325 @@ + + */ +class CatalogVariantUpdateJobCreateQueryResourceObjectAttributesVariants implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'CatalogVariantUpdateJobCreateQueryResourceObject_attributes_variants'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\CatalogVariantUpdateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\CatalogVariantUpdateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\CatalogVariantUpdateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/CatalogVariantUpdateQuery.php b/lib/Model/CatalogVariantUpdateQuery.php index 16c9faa..4524d36 100644 --- a/lib/Model/CatalogVariantUpdateQuery.php +++ b/lib/Model/CatalogVariantUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantUpdateQueryResourceObject.php b/lib/Model/CatalogVariantUpdateQueryResourceObject.php index bec7ec1..ec48834 100644 --- a/lib/Model/CatalogVariantUpdateQueryResourceObject.php +++ b/lib/Model/CatalogVariantUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/CatalogVariantUpdateQueryResourceObjectAttributes.php b/lib/Model/CatalogVariantUpdateQueryResourceObjectAttributes.php index 2331d09..9fe2ef1 100644 --- a/lib/Model/CatalogVariantUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/CatalogVariantUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/DataPrivacyCreateDeletionJobQuery.php b/lib/Model/DataPrivacyCreateDeletionJobQuery.php index c692e42..0351b6f 100644 --- a/lib/Model/DataPrivacyCreateDeletionJobQuery.php +++ b/lib/Model/DataPrivacyCreateDeletionJobQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObject.php b/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObject.php index 7ca1586..4cfd2ac 100644 --- a/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObject.php +++ b/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributes.php b/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributes.php index 6eeaffa..a0a847a 100644 --- a/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributes.php +++ b/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,9 +58,7 @@ class DataPrivacyCreateDeletionJobQueryResourceObjectAttributes implements Model * @var string[] */ protected static $openAPITypes = [ - 'phone_number' => 'string', - 'profile_id' => 'string', - 'email' => 'string' + 'profile' => '\KlaviyoAPI\Model\DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile' ]; /** @@ -71,9 +69,7 @@ class DataPrivacyCreateDeletionJobQueryResourceObjectAttributes implements Model * @psalm-var array */ protected static $openAPIFormats = [ - 'phone_number' => null, - 'profile_id' => null, - 'email' => null + 'profile' => null ]; /** @@ -103,9 +99,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'phone_number' => 'phone_number', - 'profile_id' => 'profile_id', - 'email' => 'email' + 'profile' => 'profile' ]; /** @@ -114,9 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'phone_number' => 'setPhoneNumber', - 'profile_id' => 'setProfileId', - 'email' => 'setEmail' + 'profile' => 'setProfile' ]; /** @@ -125,9 +117,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'phone_number' => 'getPhoneNumber', - 'profile_id' => 'getProfileId', - 'email' => 'getEmail' + 'profile' => 'getProfile' ]; /** @@ -187,9 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['phone_number'] = $data['phone_number'] ?? null; - $this->container['profile_id'] = $data['profile_id'] ?? null; - $this->container['email'] = $data['email'] ?? null; + $this->container['profile'] = $data['profile'] ?? null; } /** @@ -201,6 +189,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['profile'] === null) { + $invalidProperties[] = "'profile' can't be null"; + } return $invalidProperties; } @@ -217,73 +208,25 @@ public function valid() /** - * Gets phone_number - * - * @return string|null - */ - public function getPhoneNumber() - { - return $this->container['phone_number']; - } - - /** - * Sets phone_number - * - * @param string|null $phone_number The phone number of the profile to delete. - * - * @return self - */ - public function setPhoneNumber($phone_number) - { - $this->container['phone_number'] = $phone_number; - - return $this; - } - - /** - * Gets profile_id - * - * @return string|null - */ - public function getProfileId() - { - return $this->container['profile_id']; - } - - /** - * Sets profile_id - * - * @param string|null $profile_id The ID of the profile to delete. This is the `id` field on the profile object. - * - * @return self - */ - public function setProfileId($profile_id) - { - $this->container['profile_id'] = $profile_id; - - return $this; - } - - /** - * Gets email + * Gets profile * - * @return string|null + * @return \KlaviyoAPI\Model\DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile */ - public function getEmail() + public function getProfile() { - return $this->container['email']; + return $this->container['profile']; } /** - * Sets email + * Sets profile * - * @param string|null $email The email address of the profile to delete. + * @param \KlaviyoAPI\Model\DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile $profile profile * * @return self */ - public function setEmail($email) + public function setProfile($profile) { - $this->container['email'] = $email; + $this->container['profile'] = $profile; return $this; } diff --git a/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile.php b/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile.php new file mode 100644 index 0000000..d43c868 --- /dev/null +++ b/lib/Model/DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile.php @@ -0,0 +1,324 @@ + + */ +class DataPrivacyCreateDeletionJobQueryResourceObjectAttributesProfile implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DataPrivacyCreateDeletionJobQueryResourceObject_attributes_profile'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\DataPrivacyProfileQueryResourceObject' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\DataPrivacyProfileQueryResourceObject + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\DataPrivacyProfileQueryResourceObject $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/DataPrivacyDeletionJobEnum.php b/lib/Model/DataPrivacyDeletionJobEnum.php index cbf58d0..f9b0575 100644 --- a/lib/Model/DataPrivacyDeletionJobEnum.php +++ b/lib/Model/DataPrivacyDeletionJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/DataPrivacyProfileQueryResourceObject.php b/lib/Model/DataPrivacyProfileQueryResourceObject.php new file mode 100644 index 0000000..945ad4e --- /dev/null +++ b/lib/Model/DataPrivacyProfileQueryResourceObject.php @@ -0,0 +1,387 @@ + + */ +class DataPrivacyProfileQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'DataPrivacyProfileQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\DataPrivacyProfileQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileEnum', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\DataPrivacyProfileQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\DataPrivacyProfileQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Primary key that uniquely identifies this profile. Generated by Klaviyo. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TagCreateQueryResourceObjectAttributes.php b/lib/Model/DataPrivacyProfileQueryResourceObjectAttributes.php similarity index 80% rename from lib/Model/TagCreateQueryResourceObjectAttributes.php rename to lib/Model/DataPrivacyProfileQueryResourceObjectAttributes.php index 7936239..83f86d1 100644 --- a/lib/Model/TagCreateQueryResourceObjectAttributes.php +++ b/lib/Model/DataPrivacyProfileQueryResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class TagCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +class DataPrivacyProfileQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class TagCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAcc * * @var string */ - protected static $openAPIModelName = 'TagCreateQueryResourceObject_attributes'; + protected static $openAPIModelName = 'DataPrivacyProfileQueryResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,8 +58,8 @@ class TagCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAcc * @var string[] */ protected static $openAPITypes = [ - 'tag_group_id' => 'string', - 'name' => 'string' + 'phone_number' => 'string', + 'email' => 'string' ]; /** @@ -70,8 +70,8 @@ class TagCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAcc * @psalm-var array */ protected static $openAPIFormats = [ - 'tag_group_id' => null, - 'name' => null + 'phone_number' => null, + 'email' => null ]; /** @@ -101,8 +101,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'tag_group_id' => 'tag_group_id', - 'name' => 'name' + 'phone_number' => 'phone_number', + 'email' => 'email' ]; /** @@ -111,8 +111,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'tag_group_id' => 'setTagGroupId', - 'name' => 'setName' + 'phone_number' => 'setPhoneNumber', + 'email' => 'setEmail' ]; /** @@ -121,8 +121,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'tag_group_id' => 'getTagGroupId', - 'name' => 'getName' + 'phone_number' => 'getPhoneNumber', + 'email' => 'getEmail' ]; /** @@ -182,8 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['tag_group_id'] = $data['tag_group_id'] ?? null; - $this->container['name'] = $data['name'] ?? null; + $this->container['phone_number'] = $data['phone_number'] ?? null; + $this->container['email'] = $data['email'] ?? null; } /** @@ -195,9 +195,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } return $invalidProperties; } @@ -214,49 +211,49 @@ public function valid() /** - * Gets tag_group_id + * Gets phone_number * * @return string|null */ - public function getTagGroupId() + public function getPhoneNumber() { - return $this->container['tag_group_id']; + return $this->container['phone_number']; } /** - * Sets tag_group_id + * Sets phone_number * - * @param string|null $tag_group_id The ID of the Tag Group to associate the Tag with. If this field is not specified, the Tag will be associated with the company's Default Tag Group. + * @param string|null $phone_number Individual's phone number in E.164 format * * @return self */ - public function setTagGroupId($tag_group_id) + public function setPhoneNumber($phone_number) { - $this->container['tag_group_id'] = $tag_group_id; + $this->container['phone_number'] = $phone_number; return $this; } /** - * Gets name + * Gets email * - * @return string + * @return string|null */ - public function getName() + public function getEmail() { - return $this->container['name']; + return $this->container['email']; } /** - * Sets name + * Sets email * - * @param string $name The Tag name + * @param string|null $email Individual's email address * * @return self */ - public function setName($name) + public function setEmail($email) { - $this->container['name'] = $name; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/ContentSubObject.php b/lib/Model/EmailContentSubObject.php similarity index 83% rename from lib/Model/ContentSubObject.php rename to lib/Model/EmailContentSubObject.php index 18b2da0..d6120a6 100644 --- a/lib/Model/ContentSubObject.php +++ b/lib/Model/EmailContentSubObject.php @@ -1,6 +1,6 @@ */ -class ContentSubObject implements ModelInterface, ArrayAccess, \JsonSerializable +class EmailContentSubObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class ContentSubObject implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'ContentSubObject'; + protected static $openAPIModelName = 'EmailContentSubObject'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,11 +58,9 @@ class ContentSubObject implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'template_name' => 'string', - 'from_label' => 'string', - 'from_email' => 'string', 'preview_text' => 'string', - 'template_id' => 'string', + 'from_email' => 'string', + 'from_label' => 'string', 'subject' => 'string' ]; @@ -74,11 +72,9 @@ class ContentSubObject implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'template_name' => null, - 'from_label' => null, - 'from_email' => null, 'preview_text' => null, - 'template_id' => null, + 'from_email' => null, + 'from_label' => null, 'subject' => null ]; @@ -109,11 +105,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'template_name' => 'template_name', - 'from_label' => 'from_label', - 'from_email' => 'from_email', 'preview_text' => 'preview_text', - 'template_id' => 'template_id', + 'from_email' => 'from_email', + 'from_label' => 'from_label', 'subject' => 'subject' ]; @@ -123,11 +117,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'template_name' => 'setTemplateName', - 'from_label' => 'setFromLabel', - 'from_email' => 'setFromEmail', 'preview_text' => 'setPreviewText', - 'template_id' => 'setTemplateId', + 'from_email' => 'setFromEmail', + 'from_label' => 'setFromLabel', 'subject' => 'setSubject' ]; @@ -137,11 +129,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'template_name' => 'getTemplateName', - 'from_label' => 'getFromLabel', - 'from_email' => 'getFromEmail', 'preview_text' => 'getPreviewText', - 'template_id' => 'getTemplateId', + 'from_email' => 'getFromEmail', + 'from_label' => 'getFromLabel', 'subject' => 'getSubject' ]; @@ -202,11 +192,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['template_name'] = $data['template_name'] ?? null; - $this->container['from_label'] = $data['from_label'] ?? null; - $this->container['from_email'] = $data['from_email'] ?? null; $this->container['preview_text'] = $data['preview_text'] ?? null; - $this->container['template_id'] = $data['template_id'] ?? null; + $this->container['from_email'] = $data['from_email'] ?? null; + $this->container['from_label'] = $data['from_label'] ?? null; $this->container['subject'] = $data['subject'] ?? null; } @@ -235,49 +223,25 @@ public function valid() /** - * Gets template_name - * - * @return string|null - */ - public function getTemplateName() - { - return $this->container['template_name']; - } - - /** - * Sets template_name - * - * @param string|null $template_name The name of the template associated to the message - * - * @return self - */ - public function setTemplateName($template_name) - { - $this->container['template_name'] = $template_name; - - return $this; - } - - /** - * Gets from_label + * Gets preview_text * * @return string|null */ - public function getFromLabel() + public function getPreviewText() { - return $this->container['from_label']; + return $this->container['preview_text']; } /** - * Sets from_label + * Sets preview_text * - * @param string|null $from_label The label associated with the from_email + * @param string|null $preview_text Preview text associated with the message * * @return self */ - public function setFromLabel($from_label) + public function setPreviewText($preview_text) { - $this->container['from_label'] = $from_label; + $this->container['preview_text'] = $preview_text; return $this; } @@ -307,49 +271,25 @@ public function setFromEmail($from_email) } /** - * Gets preview_text - * - * @return string|null - */ - public function getPreviewText() - { - return $this->container['preview_text']; - } - - /** - * Sets preview_text - * - * @param string|null $preview_text Preview text associated with the message - * - * @return self - */ - public function setPreviewText($preview_text) - { - $this->container['preview_text'] = $preview_text; - - return $this; - } - - /** - * Gets template_id + * Gets from_label * * @return string|null */ - public function getTemplateId() + public function getFromLabel() { - return $this->container['template_id']; + return $this->container['from_label']; } /** - * Sets template_id + * Sets from_label * - * @param string|null $template_id The ID of the template associated to the message + * @param string|null $from_label The label associated with the from_email * * @return self */ - public function setTemplateId($template_id) + public function setFromLabel($from_label) { - $this->container['template_id'] = $template_id; + $this->container['from_label'] = $from_label; return $this; } diff --git a/lib/Model/EmailSendOptionsSubObject.php b/lib/Model/EmailSendOptionsSubObject.php new file mode 100644 index 0000000..3d3e255 --- /dev/null +++ b/lib/Model/EmailSendOptionsSubObject.php @@ -0,0 +1,321 @@ + + */ +class EmailSendOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'EmailSendOptionsSubObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'use_smart_sending' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'use_smart_sending' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'use_smart_sending' => 'use_smart_sending' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'use_smart_sending' => 'setUseSmartSending' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'use_smart_sending' => 'getUseSmartSending' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['use_smart_sending'] = $data['use_smart_sending'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets use_smart_sending + * + * @return bool|null + */ + public function getUseSmartSending() + { + return $this->container['use_smart_sending']; + } + + /** + * Sets use_smart_sending + * + * @param bool|null $use_smart_sending Use smart sending. Defaults to True + * + * @return self + */ + public function setUseSmartSending($use_smart_sending) + { + $this->container['use_smart_sending'] = $use_smart_sending; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TrackingOptionsSubObject.php b/lib/Model/EmailTrackingOptionsSubObject.php similarity index 92% rename from lib/Model/TrackingOptionsSubObject.php rename to lib/Model/EmailTrackingOptionsSubObject.php index 6d65270..7c7ee8d 100644 --- a/lib/Model/TrackingOptionsSubObject.php +++ b/lib/Model/EmailTrackingOptionsSubObject.php @@ -1,6 +1,6 @@ */ -class TrackingOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable +class EmailTrackingOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class TrackingOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSeri * * @var string */ - protected static $openAPIModelName = 'TrackingOptionsSubObject'; + protected static $openAPIModelName = 'EmailTrackingOptionsSubObject'; /** * Array of property to type mappings. Used for (de)serialization @@ -59,9 +59,9 @@ class TrackingOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPITypes = [ 'is_tracking_clicks' => 'bool', - 'is_add_utm' => 'bool', 'utm_params' => '\KlaviyoAPI\Model\UTMParamsSubObject[]', - 'is_tracking_opens' => 'bool' + 'is_tracking_opens' => 'bool', + 'is_add_utm' => 'bool' ]; /** @@ -73,9 +73,9 @@ class TrackingOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSeri */ protected static $openAPIFormats = [ 'is_tracking_clicks' => null, - 'is_add_utm' => null, 'utm_params' => null, - 'is_tracking_opens' => null + 'is_tracking_opens' => null, + 'is_add_utm' => null ]; /** @@ -106,9 +106,9 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'is_tracking_clicks' => 'is_tracking_clicks', - 'is_add_utm' => 'is_add_utm', 'utm_params' => 'utm_params', - 'is_tracking_opens' => 'is_tracking_opens' + 'is_tracking_opens' => 'is_tracking_opens', + 'is_add_utm' => 'is_add_utm' ]; /** @@ -118,9 +118,9 @@ public static function openAPIFormats() */ protected static $setters = [ 'is_tracking_clicks' => 'setIsTrackingClicks', - 'is_add_utm' => 'setIsAddUtm', 'utm_params' => 'setUtmParams', - 'is_tracking_opens' => 'setIsTrackingOpens' + 'is_tracking_opens' => 'setIsTrackingOpens', + 'is_add_utm' => 'setIsAddUtm' ]; /** @@ -130,9 +130,9 @@ public static function openAPIFormats() */ protected static $getters = [ 'is_tracking_clicks' => 'getIsTrackingClicks', - 'is_add_utm' => 'getIsAddUtm', 'utm_params' => 'getUtmParams', - 'is_tracking_opens' => 'getIsTrackingOpens' + 'is_tracking_opens' => 'getIsTrackingOpens', + 'is_add_utm' => 'getIsAddUtm' ]; /** @@ -193,9 +193,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['is_tracking_clicks'] = $data['is_tracking_clicks'] ?? null; - $this->container['is_add_utm'] = $data['is_add_utm'] ?? null; $this->container['utm_params'] = $data['utm_params'] ?? null; $this->container['is_tracking_opens'] = $data['is_tracking_opens'] ?? null; + $this->container['is_add_utm'] = $data['is_add_utm'] ?? null; } /** @@ -247,73 +247,73 @@ public function setIsTrackingClicks($is_tracking_clicks) } /** - * Gets is_add_utm + * Gets utm_params * - * @return bool|null + * @return \KlaviyoAPI\Model\UTMParamsSubObject[]|null */ - public function getIsAddUtm() + public function getUtmParams() { - return $this->container['is_add_utm']; + return $this->container['utm_params']; } /** - * Sets is_add_utm + * Sets utm_params * - * @param bool|null $is_add_utm Whether the campaign needs UTM parameters. If set to False, UTM params will not be used. + * @param \KlaviyoAPI\Model\UTMParamsSubObject[]|null $utm_params A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults. * * @return self */ - public function setIsAddUtm($is_add_utm) + public function setUtmParams($utm_params) { - $this->container['is_add_utm'] = $is_add_utm; + $this->container['utm_params'] = $utm_params; return $this; } /** - * Gets utm_params + * Gets is_tracking_opens * - * @return \KlaviyoAPI\Model\UTMParamsSubObject[]|null + * @return bool|null */ - public function getUtmParams() + public function getIsTrackingOpens() { - return $this->container['utm_params']; + return $this->container['is_tracking_opens']; } /** - * Sets utm_params + * Sets is_tracking_opens * - * @param \KlaviyoAPI\Model\UTMParamsSubObject[]|null $utm_params A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults. + * @param bool|null $is_tracking_opens Whether the campaign is tracking open events. If not specified, uses company defaults. * * @return self */ - public function setUtmParams($utm_params) + public function setIsTrackingOpens($is_tracking_opens) { - $this->container['utm_params'] = $utm_params; + $this->container['is_tracking_opens'] = $is_tracking_opens; return $this; } /** - * Gets is_tracking_opens + * Gets is_add_utm * * @return bool|null */ - public function getIsTrackingOpens() + public function getIsAddUtm() { - return $this->container['is_tracking_opens']; + return $this->container['is_add_utm']; } /** - * Sets is_tracking_opens + * Sets is_add_utm * - * @param bool|null $is_tracking_opens Whether the campaign is tracking open events. If not specified, uses company defaults. + * @param bool|null $is_add_utm Whether the campaign needs UTM parameters. If set to False, UTM params will not be used. * * @return self */ - public function setIsTrackingOpens($is_tracking_opens) + public function setIsAddUtm($is_add_utm) { - $this->container['is_tracking_opens'] = $is_tracking_opens; + $this->container['is_add_utm'] = $is_add_utm; return $this; } diff --git a/lib/Model/EventCreateQuery.php b/lib/Model/EventCreateQueryV2.php similarity index 93% rename from lib/Model/EventCreateQuery.php rename to lib/Model/EventCreateQueryV2.php index b0850f8..3952387 100644 --- a/lib/Model/EventCreateQuery.php +++ b/lib/Model/EventCreateQueryV2.php @@ -1,6 +1,6 @@ */ -class EventCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable +class EventCreateQueryV2 implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class EventCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'EventCreateQuery'; + protected static $openAPIModelName = 'EventCreateQueryV2'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class EventCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\EventCreateQueryResourceObject' + 'data' => '\KlaviyoAPI\Model\EventCreateQueryV2ResourceObject' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\EventCreateQueryResourceObject + * @return \KlaviyoAPI\Model\EventCreateQueryV2ResourceObject */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\EventCreateQueryResourceObject $data data + * @param \KlaviyoAPI\Model\EventCreateQueryV2ResourceObject $data data * * @return self */ diff --git a/lib/Model/EventCreateQueryResourceObject.php b/lib/Model/EventCreateQueryV2ResourceObject.php similarity index 92% rename from lib/Model/EventCreateQueryResourceObject.php rename to lib/Model/EventCreateQueryV2ResourceObject.php index c004f29..3e8b5a7 100644 --- a/lib/Model/EventCreateQueryResourceObject.php +++ b/lib/Model/EventCreateQueryV2ResourceObject.php @@ -1,6 +1,6 @@ */ -class EventCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +class EventCreateQueryV2ResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class EventCreateQueryResourceObject implements ModelInterface, ArrayAccess, \Js * * @var string */ - protected static $openAPIModelName = 'EventCreateQueryResourceObject'; + protected static $openAPIModelName = 'EventCreateQueryV2ResourceObject'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class EventCreateQueryResourceObject implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'attributes' => '\KlaviyoAPI\Model\EventCreateQueryResourceObjectAttributes', + 'attributes' => '\KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\EventEnum' ]; @@ -219,7 +219,7 @@ public function valid() /** * Gets attributes * - * @return \KlaviyoAPI\Model\EventCreateQueryResourceObjectAttributes + * @return \KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributes */ public function getAttributes() { @@ -229,7 +229,7 @@ public function getAttributes() /** * Sets attributes * - * @param \KlaviyoAPI\Model\EventCreateQueryResourceObjectAttributes $attributes attributes + * @param \KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributes $attributes attributes * * @return self */ diff --git a/lib/Model/EventCreateQueryResourceObjectAttributes.php b/lib/Model/EventCreateQueryV2ResourceObjectAttributes.php similarity index 89% rename from lib/Model/EventCreateQueryResourceObjectAttributes.php rename to lib/Model/EventCreateQueryV2ResourceObjectAttributes.php index 4ab56e6..ba38aaf 100644 --- a/lib/Model/EventCreateQueryResourceObjectAttributes.php +++ b/lib/Model/EventCreateQueryV2ResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class EventCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +class EventCreateQueryV2ResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class EventCreateQueryResourceObjectAttributes implements ModelInterface, ArrayA * * @var string */ - protected static $openAPIModelName = 'EventCreateQueryResourceObject_attributes'; + protected static $openAPIModelName = 'EventCreateQueryV2ResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,8 +58,8 @@ class EventCreateQueryResourceObjectAttributes implements ModelInterface, ArrayA * @var string[] */ protected static $openAPITypes = [ - 'profile' => 'object', - 'metric' => '\KlaviyoAPI\Model\MetricCreateQuery', + 'profile' => '\KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributesProfile', + 'metric' => '\KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributesMetric', 'value' => 'float', 'time' => '\DateTime', 'properties' => 'object', @@ -246,7 +246,7 @@ public function valid() /** * Gets profile * - * @return object + * @return \KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributesProfile */ public function getProfile() { @@ -256,7 +256,7 @@ public function getProfile() /** * Sets profile * - * @param object $profile Properties of the profile that triggered this event. The profile must contain an identifier. The $email and/or $phone_number can be used as the identify the profile. Other key value pairs can be used to create segments. For example, to create a list of people on trial plans, include a profile's plan type in the profile. The profile supports special fields. The fields include: $email (string), $first_name (string), $last_name (string), $phone_number (string), $city (string), $region (string; state or other region), $country (string), $zip (string), $image (string; url to a photo of a person), and $consent (list of strings; eg: ['sms', 'email', 'web', 'directmail', 'mobile']). + * @param \KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributesProfile $profile profile * * @return self */ @@ -270,7 +270,7 @@ public function setProfile($profile) /** * Gets metric * - * @return \KlaviyoAPI\Model\MetricCreateQuery + * @return \KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributesMetric */ public function getMetric() { @@ -280,7 +280,7 @@ public function getMetric() /** * Sets metric * - * @param \KlaviyoAPI\Model\MetricCreateQuery $metric metric + * @param \KlaviyoAPI\Model\EventCreateQueryV2ResourceObjectAttributesMetric $metric metric * * @return self */ diff --git a/lib/Model/EventCreateQueryV2ResourceObjectAttributesMetric.php b/lib/Model/EventCreateQueryV2ResourceObjectAttributesMetric.php new file mode 100644 index 0000000..ac6667c --- /dev/null +++ b/lib/Model/EventCreateQueryV2ResourceObjectAttributesMetric.php @@ -0,0 +1,324 @@ + + */ +class EventCreateQueryV2ResourceObjectAttributesMetric implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'EventCreateQueryV2ResourceObject_attributes_metric'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\MetricCreateQueryResourceObject' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\MetricCreateQueryResourceObject + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\MetricCreateQueryResourceObject $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EventCreateQueryV2ResourceObjectAttributesProfile.php b/lib/Model/EventCreateQueryV2ResourceObjectAttributesProfile.php new file mode 100644 index 0000000..3c5d18d --- /dev/null +++ b/lib/Model/EventCreateQueryV2ResourceObjectAttributesProfile.php @@ -0,0 +1,324 @@ + + */ +class EventCreateQueryV2ResourceObjectAttributesProfile implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'EventCreateQueryV2ResourceObject_attributes_profile'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\OnsiteProfileCreateQueryResourceObject' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\OnsiteProfileCreateQueryResourceObject + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\OnsiteProfileCreateQueryResourceObject $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/EventEnum.php b/lib/Model/EventEnum.php index 49fc7d6..f2151f3 100644 --- a/lib/Model/EventEnum.php +++ b/lib/Model/EventEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/FlowEnum.php b/lib/Model/FlowEnum.php index ecc9448..584ae12 100644 --- a/lib/Model/FlowEnum.php +++ b/lib/Model/FlowEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/FlowUpdateQuery.php b/lib/Model/FlowUpdateQuery.php index b451d5c..51fcf4a 100644 --- a/lib/Model/FlowUpdateQuery.php +++ b/lib/Model/FlowUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/FlowUpdateQueryResourceObject.php b/lib/Model/FlowUpdateQueryResourceObject.php index 083cdea..a711091 100644 --- a/lib/Model/FlowUpdateQueryResourceObject.php +++ b/lib/Model/FlowUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/FlowUpdateQueryResourceObjectAttributes.php b/lib/Model/FlowUpdateQueryResourceObjectAttributes.php index a659976..aeea5d5 100644 --- a/lib/Model/FlowUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/FlowUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/GetCreateVariantsJobs400Response.php b/lib/Model/GetCreateVariantsJobs400Response.php index 97ef16b..332f492 100644 --- a/lib/Model/GetCreateVariantsJobs400Response.php +++ b/lib/Model/GetCreateVariantsJobs400Response.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/GetCreateVariantsJobs400ResponseErrorsInner.php b/lib/Model/GetCreateVariantsJobs400ResponseErrorsInner.php index e0abd2d..14faf33 100644 --- a/lib/Model/GetCreateVariantsJobs400ResponseErrorsInner.php +++ b/lib/Model/GetCreateVariantsJobs400ResponseErrorsInner.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/GetCreateVariantsJobs400ResponseErrorsInnerSource.php b/lib/Model/GetCreateVariantsJobs400ResponseErrorsInnerSource.php index b2cc173..a7bd16f 100644 --- a/lib/Model/GetCreateVariantsJobs400ResponseErrorsInnerSource.php +++ b/lib/Model/GetCreateVariantsJobs400ResponseErrorsInnerSource.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListCreateQuery.php b/lib/Model/ListCreateQuery.php index 804c088..04d8612 100644 --- a/lib/Model/ListCreateQuery.php +++ b/lib/Model/ListCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListCreateQueryResourceObject.php b/lib/Model/ListCreateQueryResourceObject.php index 55d09f0..c2cb7f8 100644 --- a/lib/Model/ListCreateQueryResourceObject.php +++ b/lib/Model/ListCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class ListCreateQueryResourceObject implements ModelInterface, ArrayAccess, \Jso * @var string[] */ protected static $openAPITypes = [ - 'attributes' => '\KlaviyoAPI\Model\ListCreateQueryResourceObjectAttributes', + 'attributes' => '\KlaviyoAPI\Model\ListPartialUpdateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\ListEnum' ]; @@ -219,7 +219,7 @@ public function valid() /** * Gets attributes * - * @return \KlaviyoAPI\Model\ListCreateQueryResourceObjectAttributes + * @return \KlaviyoAPI\Model\ListPartialUpdateQueryResourceObjectAttributes */ public function getAttributes() { @@ -229,7 +229,7 @@ public function getAttributes() /** * Sets attributes * - * @param \KlaviyoAPI\Model\ListCreateQueryResourceObjectAttributes $attributes attributes + * @param \KlaviyoAPI\Model\ListPartialUpdateQueryResourceObjectAttributes $attributes attributes * * @return self */ diff --git a/lib/Model/ListEnum.php b/lib/Model/ListEnum.php index 892bf7a..58688fa 100644 --- a/lib/Model/ListEnum.php +++ b/lib/Model/ListEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListMembersAddQuery.php b/lib/Model/ListMembersAddQuery.php index 14a84d3..8b9fa94 100644 --- a/lib/Model/ListMembersAddQuery.php +++ b/lib/Model/ListMembersAddQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListMembersAddQueryDataInner.php b/lib/Model/ListMembersAddQueryDataInner.php index 02b6eab..5f6c3f4 100644 --- a/lib/Model/ListMembersAddQueryDataInner.php +++ b/lib/Model/ListMembersAddQueryDataInner.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListMembersDeleteQuery.php b/lib/Model/ListMembersDeleteQuery.php index 4bdc2dd..6578c80 100644 --- a/lib/Model/ListMembersDeleteQuery.php +++ b/lib/Model/ListMembersDeleteQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListPartialUpdateQuery.php b/lib/Model/ListPartialUpdateQuery.php index 76bc04d..16d3eef 100644 --- a/lib/Model/ListPartialUpdateQuery.php +++ b/lib/Model/ListPartialUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ListPartialUpdateQueryResourceObject.php b/lib/Model/ListPartialUpdateQueryResourceObject.php index f84fe26..cf5dc98 100644 --- a/lib/Model/ListPartialUpdateQueryResourceObject.php +++ b/lib/Model/ListPartialUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class ListPartialUpdateQueryResourceObject implements ModelInterface, ArrayAcces * @var string[] */ protected static $openAPITypes = [ - 'attributes' => '\KlaviyoAPI\Model\ListCreateQueryResourceObjectAttributes', + 'attributes' => '\KlaviyoAPI\Model\ListPartialUpdateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\ListEnum', 'id' => 'string' ]; @@ -228,7 +228,7 @@ public function valid() /** * Gets attributes * - * @return \KlaviyoAPI\Model\ListCreateQueryResourceObjectAttributes + * @return \KlaviyoAPI\Model\ListPartialUpdateQueryResourceObjectAttributes */ public function getAttributes() { @@ -238,7 +238,7 @@ public function getAttributes() /** * Sets attributes * - * @param \KlaviyoAPI\Model\ListCreateQueryResourceObjectAttributes $attributes attributes + * @param \KlaviyoAPI\Model\ListPartialUpdateQueryResourceObjectAttributes $attributes attributes * * @return self */ diff --git a/lib/Model/ListCreateQueryResourceObjectAttributes.php b/lib/Model/ListPartialUpdateQueryResourceObjectAttributes.php similarity index 94% rename from lib/Model/ListCreateQueryResourceObjectAttributes.php rename to lib/Model/ListPartialUpdateQueryResourceObjectAttributes.php index f171254..5929a54 100644 --- a/lib/Model/ListCreateQueryResourceObjectAttributes.php +++ b/lib/Model/ListPartialUpdateQueryResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class ListCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +class ListPartialUpdateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class ListCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAc * * @var string */ - protected static $openAPIModelName = 'ListCreateQueryResourceObject_attributes'; + protected static $openAPIModelName = 'ListPartialUpdateQueryResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/MetricAggregateEnum.php b/lib/Model/MetricAggregateEnum.php index e78522a..97b12ce 100644 --- a/lib/Model/MetricAggregateEnum.php +++ b/lib/Model/MetricAggregateEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/MetricAggregateQuery.php b/lib/Model/MetricAggregateQuery.php index 31cf6ec..10fc021 100644 --- a/lib/Model/MetricAggregateQuery.php +++ b/lib/Model/MetricAggregateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/MetricAggregateQueryResourceObject.php b/lib/Model/MetricAggregateQueryResourceObject.php index 3cbe251..c66cf46 100644 --- a/lib/Model/MetricAggregateQueryResourceObject.php +++ b/lib/Model/MetricAggregateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/MetricAggregateQueryResourceObjectAttributes.php b/lib/Model/MetricAggregateQueryResourceObjectAttributes.php index 992c797..ad7147e 100644 --- a/lib/Model/MetricAggregateQueryResourceObjectAttributes.php +++ b/lib/Model/MetricAggregateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -474,7 +474,7 @@ public function __construct(array $data = null) { $this->container['sort'] = $data['sort'] ?? null; $this->container['page_cursor'] = $data['page_cursor'] ?? null; - $this->container['interval'] = $data['interval'] ?? null; + $this->container['interval'] = $data['interval'] ?? 'day'; $this->container['metric_id'] = $data['metric_id'] ?? null; $this->container['return_fields'] = $data['return_fields'] ?? null; $this->container['measurements'] = $data['measurements'] ?? null; @@ -502,9 +502,6 @@ public function listInvalidProperties() ); } - if ($this->container['interval'] === null) { - $invalidProperties[] = "'interval' can't be null"; - } $allowedValues = $this->getIntervalAllowableValues(); if (!is_null($this->container['interval']) && !in_array($this->container['interval'], $allowedValues, true)) { $invalidProperties[] = sprintf( @@ -599,7 +596,7 @@ public function setPageCursor($page_cursor) /** * Gets interval * - * @return string + * @return string|null */ public function getInterval() { @@ -609,14 +606,14 @@ public function getInterval() /** * Sets interval * - * @param string $interval Aggregation interval, e.g. \"hour\", \"day\", \"week\", \"month\" + * @param string|null $interval Aggregation interval, e.g. \"hour\", \"day\", \"week\", \"month\" * * @return self */ public function setInterval($interval) { $allowedValues = $this->getIntervalAllowableValues(); - if (!in_array($interval, $allowedValues, true)) { + if (!is_null($interval) && !in_array($interval, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'interval', must be one of '%s'", diff --git a/lib/Model/UnsubscriptionCreateJobCreateQueryResourceObject.php b/lib/Model/MetricCreateQueryResourceObject.php similarity index 88% rename from lib/Model/UnsubscriptionCreateJobCreateQueryResourceObject.php rename to lib/Model/MetricCreateQueryResourceObject.php index 01c9529..fca583a 100644 --- a/lib/Model/UnsubscriptionCreateJobCreateQueryResourceObject.php +++ b/lib/Model/MetricCreateQueryResourceObject.php @@ -1,6 +1,6 @@ */ -class UnsubscriptionCreateJobCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +class MetricCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UnsubscriptionCreateJobCreateQueryResourceObject implements ModelInterface * * @var string */ - protected static $openAPIModelName = 'UnsubscriptionCreateJobCreateQueryResourceObject'; + protected static $openAPIModelName = '_MetricCreateQueryResourceObject'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,8 +58,8 @@ class UnsubscriptionCreateJobCreateQueryResourceObject implements ModelInterface * @var string[] */ protected static $openAPITypes = [ - 'attributes' => '\KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQueryResourceObjectAttributes', - 'type' => '\KlaviyoAPI\Model\ProfileUnsubscriptionBulkCreateJobEnum' + 'attributes' => '\KlaviyoAPI\Model\MetricCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\MetricEnum' ]; /** @@ -219,7 +219,7 @@ public function valid() /** * Gets attributes * - * @return \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQueryResourceObjectAttributes + * @return \KlaviyoAPI\Model\MetricCreateQueryResourceObjectAttributes */ public function getAttributes() { @@ -229,7 +229,7 @@ public function getAttributes() /** * Sets attributes * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQueryResourceObjectAttributes $attributes attributes + * @param \KlaviyoAPI\Model\MetricCreateQueryResourceObjectAttributes $attributes attributes * * @return self */ @@ -243,7 +243,7 @@ public function setAttributes($attributes) /** * Gets type * - * @return \KlaviyoAPI\Model\ProfileUnsubscriptionBulkCreateJobEnum + * @return \KlaviyoAPI\Model\MetricEnum */ public function getType() { @@ -253,7 +253,7 @@ public function getType() /** * Sets type * - * @param \KlaviyoAPI\Model\ProfileUnsubscriptionBulkCreateJobEnum $type type + * @param \KlaviyoAPI\Model\MetricEnum $type type * * @return self */ diff --git a/lib/Model/MetricCreateQuery.php b/lib/Model/MetricCreateQueryResourceObjectAttributes.php similarity index 95% rename from lib/Model/MetricCreateQuery.php rename to lib/Model/MetricCreateQueryResourceObjectAttributes.php index 1429153..84a2273 100644 --- a/lib/Model/MetricCreateQuery.php +++ b/lib/Model/MetricCreateQueryResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class MetricCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable +class MetricCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class MetricCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializabl * * @var string */ - protected static $openAPIModelName = '_MetricCreateQuery'; + protected static $openAPIModelName = '_MetricCreateQueryResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/ProfileUnsubscriptionBulkCreateJobEnum.php b/lib/Model/MetricEnum.php similarity index 73% rename from lib/Model/ProfileUnsubscriptionBulkCreateJobEnum.php rename to lib/Model/MetricEnum.php index 8ba3407..97bfd95 100644 --- a/lib/Model/ProfileUnsubscriptionBulkCreateJobEnum.php +++ b/lib/Model/MetricEnum.php @@ -1,6 +1,6 @@ + */ +class OnsiteProfileCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OnsiteProfileCreateQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\OnsiteProfileCreateQueryResourceObjectAttributes', + 'meta' => '\KlaviyoAPI\Model\OnsiteProfileMeta', + 'type' => '\KlaviyoAPI\Model\ProfileEnum', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'meta' => null, + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'meta' => 'meta', + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'meta' => 'setMeta', + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'meta' => 'getMeta', + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\OnsiteProfileCreateQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\OnsiteProfileCreateQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets meta + * + * @return \KlaviyoAPI\Model\OnsiteProfileMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \KlaviyoAPI\Model\OnsiteProfileMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Primary key that uniquely identifies this profile. Generated by Klaviyo. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OnsiteProfileCreateQueryResourceObjectAttributes.php b/lib/Model/OnsiteProfileCreateQueryResourceObjectAttributes.php new file mode 100644 index 0000000..4c1162d --- /dev/null +++ b/lib/Model/OnsiteProfileCreateQueryResourceObjectAttributes.php @@ -0,0 +1,651 @@ + + */ +class OnsiteProfileCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OnsiteProfileCreateQueryResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'phone_number' => 'string', + 'first_name' => 'string', + 'last_name' => 'string', + 'anonymous_id' => 'string', + 'title' => 'string', + 'image' => 'string', + 'properties' => 'object', + 'location' => '\KlaviyoAPI\Model\ProfileLocation', + 'organization' => 'string', + '_kx' => 'string', + 'external_id' => 'string', + 'email' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'phone_number' => null, + 'first_name' => null, + 'last_name' => null, + 'anonymous_id' => null, + 'title' => null, + 'image' => null, + 'properties' => null, + 'location' => null, + 'organization' => null, + '_kx' => null, + 'external_id' => null, + 'email' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'phone_number' => 'phone_number', + 'first_name' => 'first_name', + 'last_name' => 'last_name', + 'anonymous_id' => 'anonymous_id', + 'title' => 'title', + 'image' => 'image', + 'properties' => 'properties', + 'location' => 'location', + 'organization' => 'organization', + '_kx' => '_kx', + 'external_id' => 'external_id', + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'phone_number' => 'setPhoneNumber', + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'anonymous_id' => 'setAnonymousId', + 'title' => 'setTitle', + 'image' => 'setImage', + 'properties' => 'setProperties', + 'location' => 'setLocation', + 'organization' => 'setOrganization', + '_kx' => 'setKx', + 'external_id' => 'setExternalId', + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'phone_number' => 'getPhoneNumber', + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'anonymous_id' => 'getAnonymousId', + 'title' => 'getTitle', + 'image' => 'getImage', + 'properties' => 'getProperties', + 'location' => 'getLocation', + 'organization' => 'getOrganization', + '_kx' => 'getKx', + 'external_id' => 'getExternalId', + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['phone_number'] = $data['phone_number'] ?? null; + $this->container['first_name'] = $data['first_name'] ?? null; + $this->container['last_name'] = $data['last_name'] ?? null; + $this->container['anonymous_id'] = $data['anonymous_id'] ?? null; + $this->container['title'] = $data['title'] ?? null; + $this->container['image'] = $data['image'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['location'] = $data['location'] ?? null; + $this->container['organization'] = $data['organization'] ?? null; + $this->container['_kx'] = $data['_kx'] ?? null; + $this->container['external_id'] = $data['external_id'] ?? null; + $this->container['email'] = $data['email'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Individual's phone number in E.164 format + * + * @return self + */ + public function setPhoneNumber($phone_number) + { + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets first_name + * + * @return string|null + */ + public function getFirstName() + { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string|null $first_name Individual's first name + * + * @return self + */ + public function setFirstName($first_name) + { + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string|null + */ + public function getLastName() + { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string|null $last_name Individual's last name + * + * @return self + */ + public function setLastName($last_name) + { + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets anonymous_id + * + * @return string|null + */ + public function getAnonymousId() + { + return $this->container['anonymous_id']; + } + + /** + * Sets anonymous_id + * + * @param string|null $anonymous_id anonymous_id + * + * @return self + */ + public function setAnonymousId($anonymous_id) + { + $this->container['anonymous_id'] = $anonymous_id; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title Individual's job title + * + * @return self + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets image + * + * @return string|null + */ + public function getImage() + { + return $this->container['image']; + } + + /** + * Sets image + * + * @param string|null $image URL pointing to the location of a profile image + * + * @return self + */ + public function setImage($image) + { + $this->container['image'] = $image; + + return $this; + } + + /** + * Gets properties + * + * @return object|null + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param object|null $properties An object containing key/value pairs for any custom properties assigned to this profile + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } + + /** + * Gets location + * + * @return \KlaviyoAPI\Model\ProfileLocation|null + */ + public function getLocation() + { + return $this->container['location']; + } + + /** + * Sets location + * + * @param \KlaviyoAPI\Model\ProfileLocation|null $location location + * + * @return self + */ + public function setLocation($location) + { + $this->container['location'] = $location; + + return $this; + } + + /** + * Gets organization + * + * @return string|null + */ + public function getOrganization() + { + return $this->container['organization']; + } + + /** + * Sets organization + * + * @param string|null $organization Name of the company or organization within the company for whom the individual works + * + * @return self + */ + public function setOrganization($organization) + { + $this->container['organization'] = $organization; + + return $this; + } + + /** + * Gets _kx + * + * @return string|null + */ + public function getKx() + { + return $this->container['_kx']; + } + + /** + * Sets _kx + * + * @param string|null $_kx Also known as the `exchange_id`, this is an encrypted identifier used for identifying a profile by Klaviyo's web tracking. You can use this field as a filter when retrieving profiles via the Get Profiles endpoint. + * + * @return self + */ + public function setKx($_kx) + { + $this->container['_kx'] = $_kx; + + return $this; + } + + /** + * Gets external_id + * + * @return string|null + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string|null $external_id A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system. + * + * @return self + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email Individual's email address + * + * @return self + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/OnsiteProfileMeta.php b/lib/Model/OnsiteProfileMeta.php new file mode 100644 index 0000000..00d2686 --- /dev/null +++ b/lib/Model/OnsiteProfileMeta.php @@ -0,0 +1,321 @@ + + */ +class OnsiteProfileMeta implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'OnsiteProfileMeta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'patch_properties' => '\KlaviyoAPI\Model\ProfileMetaPatchProperties' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'patch_properties' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'patch_properties' => 'patch_properties' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'patch_properties' => 'setPatchProperties' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'patch_properties' => 'getPatchProperties' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['patch_properties'] = $data['patch_properties'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets patch_properties + * + * @return \KlaviyoAPI\Model\ProfileMetaPatchProperties|null + */ + public function getPatchProperties() + { + return $this->container['patch_properties']; + } + + /** + * Sets patch_properties + * + * @param \KlaviyoAPI\Model\ProfileMetaPatchProperties|null $patch_properties patch_properties + * + * @return self + */ + public function setPatchProperties($patch_properties) + { + $this->container['patch_properties'] = $patch_properties; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ProfileCreateQuery.php b/lib/Model/ProfileCreateQuery.php index 694f539..7d606db 100644 --- a/lib/Model/ProfileCreateQuery.php +++ b/lib/Model/ProfileCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileCreateQueryResourceObject.php b/lib/Model/ProfileCreateQueryResourceObject.php index 4f3536f..803d819 100644 --- a/lib/Model/ProfileCreateQueryResourceObject.php +++ b/lib/Model/ProfileCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileCreateQueryResourceObjectAttributes.php b/lib/Model/ProfileCreateQueryResourceObjectAttributes.php index d31b5e7..12ca971 100644 --- a/lib/Model/ProfileCreateQueryResourceObjectAttributes.php +++ b/lib/Model/ProfileCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileEnum.php b/lib/Model/ProfileEnum.php index 7d79413..d6fbb18 100644 --- a/lib/Model/ProfileEnum.php +++ b/lib/Model/ProfileEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileIdentifierDTOResourceObject.php b/lib/Model/ProfileIdentifierDTOResourceObject.php new file mode 100644 index 0000000..0c0a4ce --- /dev/null +++ b/lib/Model/ProfileIdentifierDTOResourceObject.php @@ -0,0 +1,387 @@ + + */ +class ProfileIdentifierDTOResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileIdentifierDTOResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\ProfileIdentifierDTOResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileEnum', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\ProfileIdentifierDTOResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\ProfileIdentifierDTOResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id Primary key that uniquely identifies this profile. Generated by Klaviyo. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ProfileIdentifierDTOResourceObjectAttributes.php b/lib/Model/ProfileIdentifierDTOResourceObjectAttributes.php new file mode 100644 index 0000000..bc778c4 --- /dev/null +++ b/lib/Model/ProfileIdentifierDTOResourceObjectAttributes.php @@ -0,0 +1,411 @@ + + */ +class ProfileIdentifierDTOResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileIdentifierDTOResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'phone_number' => 'string', + 'external_id' => 'string', + 'email' => 'string', + 'anonymous_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'phone_number' => null, + 'external_id' => null, + 'email' => null, + 'anonymous_id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'phone_number' => 'phone_number', + 'external_id' => 'external_id', + 'email' => 'email', + 'anonymous_id' => 'anonymous_id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'phone_number' => 'setPhoneNumber', + 'external_id' => 'setExternalId', + 'email' => 'setEmail', + 'anonymous_id' => 'setAnonymousId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'phone_number' => 'getPhoneNumber', + 'external_id' => 'getExternalId', + 'email' => 'getEmail', + 'anonymous_id' => 'getAnonymousId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['phone_number'] = $data['phone_number'] ?? null; + $this->container['external_id'] = $data['external_id'] ?? null; + $this->container['email'] = $data['email'] ?? null; + $this->container['anonymous_id'] = $data['anonymous_id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Individual's phone number in E.164 format + * + * @return self + */ + public function setPhoneNumber($phone_number) + { + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets external_id + * + * @return string|null + */ + public function getExternalId() + { + return $this->container['external_id']; + } + + /** + * Sets external_id + * + * @param string|null $external_id A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system. + * + * @return self + */ + public function setExternalId($external_id) + { + $this->container['external_id'] = $external_id; + + return $this; + } + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email Individual's email address + * + * @return self + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets anonymous_id + * + * @return string|null + */ + public function getAnonymousId() + { + return $this->container['anonymous_id']; + } + + /** + * Sets anonymous_id + * + * @param string|null $anonymous_id anonymous_id + * + * @return self + */ + public function setAnonymousId($anonymous_id) + { + $this->container['anonymous_id'] = $anonymous_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ProfileLocation.php b/lib/Model/ProfileLocation.php index 0f0bd5a..e30fb06 100644 --- a/lib/Model/ProfileLocation.php +++ b/lib/Model/ProfileLocation.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileLocationLatitude.php b/lib/Model/ProfileLocationLatitude.php index 4b125cd..c5381f1 100644 --- a/lib/Model/ProfileLocationLatitude.php +++ b/lib/Model/ProfileLocationLatitude.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileLocationLongitude.php b/lib/Model/ProfileLocationLongitude.php index 6da60ee..bedf724 100644 --- a/lib/Model/ProfileLocationLongitude.php +++ b/lib/Model/ProfileLocationLongitude.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileMeta.php b/lib/Model/ProfileMeta.php new file mode 100644 index 0000000..5a3ecc4 --- /dev/null +++ b/lib/Model/ProfileMeta.php @@ -0,0 +1,321 @@ + + */ +class ProfileMeta implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileMeta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'patch_properties' => '\KlaviyoAPI\Model\ProfileMetaPatchProperties' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'patch_properties' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'patch_properties' => 'patch_properties' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'patch_properties' => 'setPatchProperties' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'patch_properties' => 'getPatchProperties' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['patch_properties'] = $data['patch_properties'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets patch_properties + * + * @return \KlaviyoAPI\Model\ProfileMetaPatchProperties|null + */ + public function getPatchProperties() + { + return $this->container['patch_properties']; + } + + /** + * Sets patch_properties + * + * @param \KlaviyoAPI\Model\ProfileMetaPatchProperties|null $patch_properties patch_properties + * + * @return self + */ + public function setPatchProperties($patch_properties) + { + $this->container['patch_properties'] = $patch_properties; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UnsubscriptionCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/ProfileMetaPatchProperties.php similarity index 75% rename from lib/Model/UnsubscriptionCreateJobCreateQueryResourceObjectAttributes.php rename to lib/Model/ProfileMetaPatchProperties.php index b17477a..64ef3b7 100644 --- a/lib/Model/UnsubscriptionCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/ProfileMetaPatchProperties.php @@ -1,6 +1,6 @@ */ -class UnsubscriptionCreateJobCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +class ProfileMetaPatchProperties implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UnsubscriptionCreateJobCreateQueryResourceObjectAttributes implements Mode * * @var string */ - protected static $openAPIModelName = 'UnsubscriptionCreateJobCreateQueryResourceObject_attributes'; + protected static $openAPIModelName = 'ProfileMetaPatchProperties'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,9 +58,9 @@ class UnsubscriptionCreateJobCreateQueryResourceObjectAttributes implements Mode * @var string[] */ protected static $openAPITypes = [ - 'phone_numbers' => 'string[]', - 'emails' => 'string[]', - 'list_id' => 'string' + 'unappend' => 'object', + 'unset' => '\KlaviyoAPI\Model\ProfileMetaPatchPropertiesUnset', + 'append' => 'object' ]; /** @@ -71,9 +71,9 @@ class UnsubscriptionCreateJobCreateQueryResourceObjectAttributes implements Mode * @psalm-var array */ protected static $openAPIFormats = [ - 'phone_numbers' => null, - 'emails' => null, - 'list_id' => null + 'unappend' => null, + 'unset' => null, + 'append' => null ]; /** @@ -103,9 +103,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'phone_numbers' => 'phone_numbers', - 'emails' => 'emails', - 'list_id' => 'list_id' + 'unappend' => 'unappend', + 'unset' => 'unset', + 'append' => 'append' ]; /** @@ -114,9 +114,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'phone_numbers' => 'setPhoneNumbers', - 'emails' => 'setEmails', - 'list_id' => 'setListId' + 'unappend' => 'setUnappend', + 'unset' => 'setUnset', + 'append' => 'setAppend' ]; /** @@ -125,9 +125,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'phone_numbers' => 'getPhoneNumbers', - 'emails' => 'getEmails', - 'list_id' => 'getListId' + 'unappend' => 'getUnappend', + 'unset' => 'getUnset', + 'append' => 'getAppend' ]; /** @@ -187,9 +187,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['phone_numbers'] = $data['phone_numbers'] ?? null; - $this->container['emails'] = $data['emails'] ?? null; - $this->container['list_id'] = $data['list_id'] ?? null; + $this->container['unappend'] = $data['unappend'] ?? null; + $this->container['unset'] = $data['unset'] ?? null; + $this->container['append'] = $data['append'] ?? null; } /** @@ -217,73 +217,73 @@ public function valid() /** - * Gets phone_numbers + * Gets unappend * - * @return string[]|null + * @return object|null */ - public function getPhoneNumbers() + public function getUnappend() { - return $this->container['phone_numbers']; + return $this->container['unappend']; } /** - * Sets phone_numbers + * Sets unappend * - * @param string[]|null $phone_numbers The phone numbers to unsubscribe if any. + * @param object|null $unappend Remove a simple value or values from this property array * * @return self */ - public function setPhoneNumbers($phone_numbers) + public function setUnappend($unappend) { - $this->container['phone_numbers'] = $phone_numbers; + $this->container['unappend'] = $unappend; return $this; } /** - * Gets emails + * Gets unset * - * @return string[]|null + * @return \KlaviyoAPI\Model\ProfileMetaPatchPropertiesUnset|null */ - public function getEmails() + public function getUnset() { - return $this->container['emails']; + return $this->container['unset']; } /** - * Sets emails + * Sets unset * - * @param string[]|null $emails The emails to unsubscribe if any. + * @param \KlaviyoAPI\Model\ProfileMetaPatchPropertiesUnset|null $unset unset * * @return self */ - public function setEmails($emails) + public function setUnset($unset) { - $this->container['emails'] = $emails; + $this->container['unset'] = $unset; return $this; } /** - * Gets list_id + * Gets append * - * @return string|null + * @return object|null */ - public function getListId() + public function getAppend() { - return $this->container['list_id']; + return $this->container['append']; } /** - * Sets list_id + * Sets append * - * @param string|null $list_id Optional, the list to remove the profiles from + * @param object|null $append Append a simple value or values to this property array * * @return self */ - public function setListId($list_id) + public function setAppend($append) { - $this->container['list_id'] = $list_id; + $this->container['append'] = $append; return $this; } diff --git a/lib/Model/ProfileMetaPatchPropertiesUnset.php b/lib/Model/ProfileMetaPatchPropertiesUnset.php new file mode 100644 index 0000000..cacc757 --- /dev/null +++ b/lib/Model/ProfileMetaPatchPropertiesUnset.php @@ -0,0 +1,297 @@ + + */ +class ProfileMetaPatchPropertiesUnset implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileMetaPatchProperties_unset'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ProfilePartialUpdateQuery.php b/lib/Model/ProfilePartialUpdateQuery.php index d1451c3..85c7273 100644 --- a/lib/Model/ProfilePartialUpdateQuery.php +++ b/lib/Model/ProfilePartialUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfilePartialUpdateQueryResourceObject.php b/lib/Model/ProfilePartialUpdateQueryResourceObject.php index 967d5fc..5e4e713 100644 --- a/lib/Model/ProfilePartialUpdateQueryResourceObject.php +++ b/lib/Model/ProfilePartialUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -59,6 +59,7 @@ class ProfilePartialUpdateQueryResourceObject implements ModelInterface, ArrayAc */ protected static $openAPITypes = [ 'attributes' => '\KlaviyoAPI\Model\ProfilePartialUpdateQueryResourceObjectAttributes', + 'meta' => '\KlaviyoAPI\Model\ProfileMeta', 'type' => '\KlaviyoAPI\Model\ProfileEnum', 'id' => 'string' ]; @@ -72,6 +73,7 @@ class ProfilePartialUpdateQueryResourceObject implements ModelInterface, ArrayAc */ protected static $openAPIFormats = [ 'attributes' => null, + 'meta' => null, 'type' => null, 'id' => null ]; @@ -104,6 +106,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'attributes' => 'attributes', + 'meta' => 'meta', 'type' => 'type', 'id' => 'id' ]; @@ -115,6 +118,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'attributes' => 'setAttributes', + 'meta' => 'setMeta', 'type' => 'setType', 'id' => 'setId' ]; @@ -126,6 +130,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'attributes' => 'getAttributes', + 'meta' => 'getMeta', 'type' => 'getType', 'id' => 'getId' ]; @@ -188,6 +193,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['meta'] = $data['meta'] ?? null; $this->container['type'] = $data['type'] ?? null; $this->container['id'] = $data['id'] ?? null; } @@ -249,6 +255,30 @@ public function setAttributes($attributes) return $this; } + /** + * Gets meta + * + * @return \KlaviyoAPI\Model\ProfileMeta|null + */ + public function getMeta() + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \KlaviyoAPI\Model\ProfileMeta|null $meta meta + * + * @return self + */ + public function setMeta($meta) + { + $this->container['meta'] = $meta; + + return $this; + } + /** * Gets type * diff --git a/lib/Model/ProfilePartialUpdateQueryResourceObjectAttributes.php b/lib/Model/ProfilePartialUpdateQueryResourceObjectAttributes.php index 838d4a1..58f4bbb 100644 --- a/lib/Model/ProfilePartialUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/ProfilePartialUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileSubscriptionBulkCreateJobEnum.php b/lib/Model/ProfileSubscriptionBulkCreateJobEnum.php index 6880c29..7962236 100644 --- a/lib/Model/ProfileSubscriptionBulkCreateJobEnum.php +++ b/lib/Model/ProfileSubscriptionBulkCreateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileSubscriptionBulkDeleteJobEnum.php b/lib/Model/ProfileSubscriptionBulkDeleteJobEnum.php new file mode 100644 index 0000000..361cd34 --- /dev/null +++ b/lib/Model/ProfileSubscriptionBulkDeleteJobEnum.php @@ -0,0 +1,60 @@ + + */ +class ProfileSubscriptionCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileSubscriptionCreateQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\ProfileSubscriptionCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileEnum', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\ProfileSubscriptionCreateQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\ProfileSubscriptionCreateQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The ID of the profile to subscribe. If provided, this will be used to perform the lookup. + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Subscription.php b/lib/Model/ProfileSubscriptionCreateQueryResourceObjectAttributes.php similarity index 81% rename from lib/Model/Subscription.php rename to lib/Model/ProfileSubscriptionCreateQueryResourceObjectAttributes.php index 8017d8a..3c1b736 100644 --- a/lib/Model/Subscription.php +++ b/lib/Model/ProfileSubscriptionCreateQueryResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class Subscription implements ModelInterface, ArrayAccess, \JsonSerializable +class ProfileSubscriptionCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class Subscription implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'Subscription'; + protected static $openAPIModelName = 'ProfileSubscriptionCreateQueryResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,10 +58,9 @@ class Subscription implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'channels' => '\KlaviyoAPI\Model\SubscriptionChannels', 'phone_number' => 'string', - 'profile_id' => 'string', - 'email' => 'string' + 'email' => 'string', + 'subscriptions' => '\KlaviyoAPI\Model\SubscriptionChannels' ]; /** @@ -72,10 +71,9 @@ class Subscription implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'channels' => null, 'phone_number' => null, - 'profile_id' => null, - 'email' => null + 'email' => null, + 'subscriptions' => null ]; /** @@ -105,10 +103,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'channels' => 'channels', 'phone_number' => 'phone_number', - 'profile_id' => 'profile_id', - 'email' => 'email' + 'email' => 'email', + 'subscriptions' => 'subscriptions' ]; /** @@ -117,10 +114,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'channels' => 'setChannels', 'phone_number' => 'setPhoneNumber', - 'profile_id' => 'setProfileId', - 'email' => 'setEmail' + 'email' => 'setEmail', + 'subscriptions' => 'setSubscriptions' ]; /** @@ -129,10 +125,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'channels' => 'getChannels', 'phone_number' => 'getPhoneNumber', - 'profile_id' => 'getProfileId', - 'email' => 'getEmail' + 'email' => 'getEmail', + 'subscriptions' => 'getSubscriptions' ]; /** @@ -192,10 +187,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['channels'] = $data['channels'] ?? null; $this->container['phone_number'] = $data['phone_number'] ?? null; - $this->container['profile_id'] = $data['profile_id'] ?? null; $this->container['email'] = $data['email'] ?? null; + $this->container['subscriptions'] = $data['subscriptions'] ?? null; } /** @@ -222,30 +216,6 @@ public function valid() } - /** - * Gets channels - * - * @return \KlaviyoAPI\Model\SubscriptionChannels|null - */ - public function getChannels() - { - return $this->container['channels']; - } - - /** - * Sets channels - * - * @param \KlaviyoAPI\Model\SubscriptionChannels|null $channels channels - * - * @return self - */ - public function setChannels($channels) - { - $this->container['channels'] = $channels; - - return $this; - } - /** * Gets phone_number * @@ -271,49 +241,49 @@ public function setPhoneNumber($phone_number) } /** - * Gets profile_id + * Gets email * * @return string|null */ - public function getProfileId() + public function getEmail() { - return $this->container['profile_id']; + return $this->container['email']; } /** - * Sets profile_id + * Sets email * - * @param string|null $profile_id The ID of the profile to subscribe. If provided, this will be used to perform the lookup. + * @param string|null $email The email address to subscribe or to set on the profile if `channels` is specified and the email channel is omitted. * * @return self */ - public function setProfileId($profile_id) + public function setEmail($email) { - $this->container['profile_id'] = $profile_id; + $this->container['email'] = $email; return $this; } /** - * Gets email + * Gets subscriptions * - * @return string|null + * @return \KlaviyoAPI\Model\SubscriptionChannels|null */ - public function getEmail() + public function getSubscriptions() { - return $this->container['email']; + return $this->container['subscriptions']; } /** - * Sets email + * Sets subscriptions * - * @param string|null $email The email address to subscribe or to set on the profile if `channels` is specified and the email channel is omitted. + * @param \KlaviyoAPI\Model\SubscriptionChannels|null $subscriptions subscriptions * * @return self */ - public function setEmail($email) + public function setSubscriptions($subscriptions) { - $this->container['email'] = $email; + $this->container['subscriptions'] = $subscriptions; return $this; } diff --git a/lib/Model/ProfileSubscriptionDeleteQueryResourceObject.php b/lib/Model/ProfileSubscriptionDeleteQueryResourceObject.php new file mode 100644 index 0000000..6e3afdd --- /dev/null +++ b/lib/Model/ProfileSubscriptionDeleteQueryResourceObject.php @@ -0,0 +1,357 @@ + + */ +class ProfileSubscriptionDeleteQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileSubscriptionDeleteQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\ProfileSubscriptionDeleteQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\ProfileSubscriptionDeleteQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\ProfileSubscriptionDeleteQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UnsuppressionCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/ProfileSubscriptionDeleteQueryResourceObjectAttributes.php similarity index 79% rename from lib/Model/UnsuppressionCreateJobCreateQueryResourceObjectAttributes.php rename to lib/Model/ProfileSubscriptionDeleteQueryResourceObjectAttributes.php index 3528acd..ea39208 100644 --- a/lib/Model/UnsuppressionCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/ProfileSubscriptionDeleteQueryResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class UnsuppressionCreateJobCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +class ProfileSubscriptionDeleteQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UnsuppressionCreateJobCreateQueryResourceObjectAttributes implements Model * * @var string */ - protected static $openAPIModelName = 'UnsuppressionCreateJobCreateQueryResourceObject_attributes'; + protected static $openAPIModelName = 'ProfileSubscriptionDeleteQueryResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,8 @@ class UnsuppressionCreateJobCreateQueryResourceObjectAttributes implements Model * @var string[] */ protected static $openAPITypes = [ - 'suppressions' => '\KlaviyoAPI\Model\Suppression[]' + 'phone_number' => 'string', + 'email' => 'string' ]; /** @@ -69,7 +70,8 @@ class UnsuppressionCreateJobCreateQueryResourceObjectAttributes implements Model * @psalm-var array */ protected static $openAPIFormats = [ - 'suppressions' => null + 'phone_number' => null, + 'email' => null ]; /** @@ -99,7 +101,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'suppressions' => 'suppressions' + 'phone_number' => 'phone_number', + 'email' => 'email' ]; /** @@ -108,7 +111,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'suppressions' => 'setSuppressions' + 'phone_number' => 'setPhoneNumber', + 'email' => 'setEmail' ]; /** @@ -117,7 +121,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'suppressions' => 'getSuppressions' + 'phone_number' => 'getPhoneNumber', + 'email' => 'getEmail' ]; /** @@ -177,7 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['suppressions'] = $data['suppressions'] ?? null; + $this->container['phone_number'] = $data['phone_number'] ?? null; + $this->container['email'] = $data['email'] ?? null; } /** @@ -189,9 +195,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['suppressions'] === null) { - $invalidProperties[] = "'suppressions' can't be null"; - } return $invalidProperties; } @@ -208,25 +211,49 @@ public function valid() /** - * Gets suppressions + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber() + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number The phone number to unsubscribe. + * + * @return self + */ + public function setPhoneNumber($phone_number) + { + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets email * - * @return \KlaviyoAPI\Model\Suppression[] + * @return string|null */ - public function getSuppressions() + public function getEmail() { - return $this->container['suppressions']; + return $this->container['email']; } /** - * Sets suppressions + * Sets email * - * @param \KlaviyoAPI\Model\Suppression[] $suppressions One or more suppressions to be removed. + * @param string|null $email The email address to unsubscribe. * * @return self */ - public function setSuppressions($suppressions) + public function setEmail($email) { - $this->container['suppressions'] = $suppressions; + $this->container['email'] = $email; return $this; } diff --git a/lib/Model/ProfileSuppressionBulkCreateJobEnum.php b/lib/Model/ProfileSuppressionBulkCreateJobEnum.php index 433c3b4..0f13689 100644 --- a/lib/Model/ProfileSuppressionBulkCreateJobEnum.php +++ b/lib/Model/ProfileSuppressionBulkCreateJobEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/ProfileSuppressionBulkDeleteJobEnum.php b/lib/Model/ProfileSuppressionBulkDeleteJobEnum.php new file mode 100644 index 0000000..6580f4f --- /dev/null +++ b/lib/Model/ProfileSuppressionBulkDeleteJobEnum.php @@ -0,0 +1,60 @@ + + */ +class ProfileSuppressionCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileSuppressionCreateQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\ProfileSuppressionCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\ProfileSuppressionCreateQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\ProfileSuppressionCreateQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/Suppression.php b/lib/Model/ProfileSuppressionCreateQueryResourceObjectAttributes.php similarity index 92% rename from lib/Model/Suppression.php rename to lib/Model/ProfileSuppressionCreateQueryResourceObjectAttributes.php index 78926fa..db10cbf 100644 --- a/lib/Model/Suppression.php +++ b/lib/Model/ProfileSuppressionCreateQueryResourceObjectAttributes.php @@ -1,6 +1,6 @@ */ -class Suppression implements ModelInterface, ArrayAccess, \JsonSerializable +class ProfileSuppressionCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class Suppression implements ModelInterface, ArrayAccess, \JsonSerializable * * @var string */ - protected static $openAPIModelName = 'Suppression'; + protected static $openAPIModelName = 'ProfileSuppressionCreateQueryResourceObject_attributes'; /** * Array of property to type mappings. Used for (de)serialization @@ -189,9 +189,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['email'] === null) { - $invalidProperties[] = "'email' can't be null"; - } return $invalidProperties; } @@ -210,7 +207,7 @@ public function valid() /** * Gets email * - * @return string + * @return string|null */ public function getEmail() { @@ -220,7 +217,7 @@ public function getEmail() /** * Sets email * - * @param string $email The email of the profile to suppress / unsuppress. + * @param string|null $email The email of the profile to suppress. * * @return self */ diff --git a/lib/Model/ProfileSuppressionDeleteQueryResourceObject.php b/lib/Model/ProfileSuppressionDeleteQueryResourceObject.php new file mode 100644 index 0000000..e46737b --- /dev/null +++ b/lib/Model/ProfileSuppressionDeleteQueryResourceObject.php @@ -0,0 +1,357 @@ + + */ +class ProfileSuppressionDeleteQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileSuppressionDeleteQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\ProfileSuppressionDeleteQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\ProfileSuppressionDeleteQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\ProfileSuppressionDeleteQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ProfileSuppressionDeleteQueryResourceObjectAttributes.php b/lib/Model/ProfileSuppressionDeleteQueryResourceObjectAttributes.php new file mode 100644 index 0000000..bc87bf5 --- /dev/null +++ b/lib/Model/ProfileSuppressionDeleteQueryResourceObjectAttributes.php @@ -0,0 +1,321 @@ + + */ +class ProfileSuppressionDeleteQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ProfileSuppressionDeleteQueryResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'email' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'email' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'email' => 'email' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'email' => 'setEmail' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'email' => 'getEmail' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['email'] = $data['email'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets email + * + * @return string|null + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string|null $email The email of the profile to unsuppress. + * + * @return self + */ + public function setEmail($email) + { + $this->container['email'] = $email; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/RenderOptionsSubObject.php b/lib/Model/RenderOptionsSubObject.php new file mode 100644 index 0000000..3b76b2a --- /dev/null +++ b/lib/Model/RenderOptionsSubObject.php @@ -0,0 +1,441 @@ + + */ +class RenderOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'RenderOptionsSubObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'add_opt_out_language' => 'bool', + 'shorten_links' => 'bool', + 'include_contact_card' => 'bool', + 'add_info_link' => 'bool', + 'add_org_prefix' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'add_opt_out_language' => null, + 'shorten_links' => null, + 'include_contact_card' => null, + 'add_info_link' => null, + 'add_org_prefix' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'add_opt_out_language' => 'add_opt_out_language', + 'shorten_links' => 'shorten_links', + 'include_contact_card' => 'include_contact_card', + 'add_info_link' => 'add_info_link', + 'add_org_prefix' => 'add_org_prefix' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'add_opt_out_language' => 'setAddOptOutLanguage', + 'shorten_links' => 'setShortenLinks', + 'include_contact_card' => 'setIncludeContactCard', + 'add_info_link' => 'setAddInfoLink', + 'add_org_prefix' => 'setAddOrgPrefix' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'add_opt_out_language' => 'getAddOptOutLanguage', + 'shorten_links' => 'getShortenLinks', + 'include_contact_card' => 'getIncludeContactCard', + 'add_info_link' => 'getAddInfoLink', + 'add_org_prefix' => 'getAddOrgPrefix' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['add_opt_out_language'] = $data['add_opt_out_language'] ?? null; + $this->container['shorten_links'] = $data['shorten_links'] ?? true; + $this->container['include_contact_card'] = $data['include_contact_card'] ?? null; + $this->container['add_info_link'] = $data['add_info_link'] ?? true; + $this->container['add_org_prefix'] = $data['add_org_prefix'] ?? true; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets add_opt_out_language + * + * @return bool|null + */ + public function getAddOptOutLanguage() + { + return $this->container['add_opt_out_language']; + } + + /** + * Sets add_opt_out_language + * + * @param bool|null $add_opt_out_language add_opt_out_language + * + * @return self + */ + public function setAddOptOutLanguage($add_opt_out_language) + { + $this->container['add_opt_out_language'] = $add_opt_out_language; + + return $this; + } + + /** + * Gets shorten_links + * + * @return bool|null + */ + public function getShortenLinks() + { + return $this->container['shorten_links']; + } + + /** + * Sets shorten_links + * + * @param bool|null $shorten_links shorten_links + * + * @return self + */ + public function setShortenLinks($shorten_links) + { + $this->container['shorten_links'] = $shorten_links; + + return $this; + } + + /** + * Gets include_contact_card + * + * @return bool|null + */ + public function getIncludeContactCard() + { + return $this->container['include_contact_card']; + } + + /** + * Sets include_contact_card + * + * @param bool|null $include_contact_card include_contact_card + * + * @return self + */ + public function setIncludeContactCard($include_contact_card) + { + $this->container['include_contact_card'] = $include_contact_card; + + return $this; + } + + /** + * Gets add_info_link + * + * @return bool|null + */ + public function getAddInfoLink() + { + return $this->container['add_info_link']; + } + + /** + * Sets add_info_link + * + * @param bool|null $add_info_link add_info_link + * + * @return self + */ + public function setAddInfoLink($add_info_link) + { + $this->container['add_info_link'] = $add_info_link; + + return $this; + } + + /** + * Gets add_org_prefix + * + * @return bool|null + */ + public function getAddOrgPrefix() + { + return $this->container['add_org_prefix']; + } + + /** + * Sets add_org_prefix + * + * @param bool|null $add_org_prefix add_org_prefix + * + * @return self + */ + public function setAddOrgPrefix($add_org_prefix) + { + $this->container['add_org_prefix'] = $add_org_prefix; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SMSContentSubObjectCreate.php b/lib/Model/SMSContentSubObjectCreate.php new file mode 100644 index 0000000..35d6dbe --- /dev/null +++ b/lib/Model/SMSContentSubObjectCreate.php @@ -0,0 +1,321 @@ + + */ +class SMSContentSubObjectCreate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SMSContentSubObjectCreate'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'body' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'body' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'body' => 'body' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'body' => 'setBody' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'body' => 'getBody' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['body'] = $data['body'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets body + * + * @return string|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string|null $body The message body + * + * @return self + */ + public function setBody($body) + { + $this->container['body'] = $body; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SendOptionsSubObject.php b/lib/Model/SMSSendOptionsSubObject.php similarity index 96% rename from lib/Model/SendOptionsSubObject.php rename to lib/Model/SMSSendOptionsSubObject.php index 1099415..ce919c3 100644 --- a/lib/Model/SendOptionsSubObject.php +++ b/lib/Model/SMSSendOptionsSubObject.php @@ -1,6 +1,6 @@ */ -class SendOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable +class SMSSendOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class SendOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializ * * @var string */ - protected static $openAPIModelName = 'SendOptionsSubObject'; + protected static $openAPIModelName = 'SMSSendOptionsSubObject'; /** * Array of property to type mappings. Used for (de)serialization diff --git a/lib/Model/SMSTrackingOptionsSubObject.php b/lib/Model/SMSTrackingOptionsSubObject.php new file mode 100644 index 0000000..a3b3a64 --- /dev/null +++ b/lib/Model/SMSTrackingOptionsSubObject.php @@ -0,0 +1,351 @@ + + */ +class SMSTrackingOptionsSubObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SMSTrackingOptionsSubObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'utm_params' => '\KlaviyoAPI\Model\UTMParamsSubObject[]', + 'is_add_utm' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'utm_params' => null, + 'is_add_utm' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'utm_params' => 'utm_params', + 'is_add_utm' => 'is_add_utm' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'utm_params' => 'setUtmParams', + 'is_add_utm' => 'setIsAddUtm' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'utm_params' => 'getUtmParams', + 'is_add_utm' => 'getIsAddUtm' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['utm_params'] = $data['utm_params'] ?? null; + $this->container['is_add_utm'] = $data['is_add_utm'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets utm_params + * + * @return \KlaviyoAPI\Model\UTMParamsSubObject[]|null + */ + public function getUtmParams() + { + return $this->container['utm_params']; + } + + /** + * Sets utm_params + * + * @param \KlaviyoAPI\Model\UTMParamsSubObject[]|null $utm_params A list of UTM parameters. If an empty list is given and is_add_utm is True, uses company defaults. + * + * @return self + */ + public function setUtmParams($utm_params) + { + $this->container['utm_params'] = $utm_params; + + return $this; + } + + /** + * Gets is_add_utm + * + * @return bool|null + */ + public function getIsAddUtm() + { + return $this->container['is_add_utm']; + } + + /** + * Sets is_add_utm + * + * @param bool|null $is_add_utm Whether the campaign needs UTM parameters. If set to False, UTM params will not be used. + * + * @return self + */ + public function setIsAddUtm($is_add_utm) + { + $this->container['is_add_utm'] = $is_add_utm; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/STOScheduleOptions.php b/lib/Model/STOScheduleOptions.php index ba25d61..c02bce3 100644 --- a/lib/Model/STOScheduleOptions.php +++ b/lib/Model/STOScheduleOptions.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SegmentEnum.php b/lib/Model/SegmentEnum.php index 6f07e90..09cca0c 100644 --- a/lib/Model/SegmentEnum.php +++ b/lib/Model/SegmentEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SegmentPartialUpdateQuery.php b/lib/Model/SegmentPartialUpdateQuery.php index feeeb91..7191ddb 100644 --- a/lib/Model/SegmentPartialUpdateQuery.php +++ b/lib/Model/SegmentPartialUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SegmentPartialUpdateQueryResourceObject.php b/lib/Model/SegmentPartialUpdateQueryResourceObject.php index a63087e..a928016 100644 --- a/lib/Model/SegmentPartialUpdateQueryResourceObject.php +++ b/lib/Model/SegmentPartialUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SegmentPartialUpdateQueryResourceObjectAttributes.php b/lib/Model/SegmentPartialUpdateQueryResourceObjectAttributes.php index 66f4e2f..ddb9118 100644 --- a/lib/Model/SegmentPartialUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/SegmentPartialUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SendStrategySubObject.php b/lib/Model/SendStrategySubObject.php index 60bac82..c030dc8 100644 --- a/lib/Model/SendStrategySubObject.php +++ b/lib/Model/SendStrategySubObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/UnsuppressionCreateJobCreateQuery.php b/lib/Model/ServerBISSubscriptionCreateQuery.php similarity index 92% rename from lib/Model/UnsuppressionCreateJobCreateQuery.php rename to lib/Model/ServerBISSubscriptionCreateQuery.php index bebec2f..da75d98 100644 --- a/lib/Model/UnsuppressionCreateJobCreateQuery.php +++ b/lib/Model/ServerBISSubscriptionCreateQuery.php @@ -1,6 +1,6 @@ */ -class UnsuppressionCreateJobCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable +class ServerBISSubscriptionCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UnsuppressionCreateJobCreateQuery implements ModelInterface, ArrayAccess, * * @var string */ - protected static $openAPIModelName = 'UnsuppressionCreateJobCreateQuery'; + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQuery'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class UnsuppressionCreateJobCreateQuery implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\UnsuppressionCreateJobCreateQueryResourceObject' + 'data' => '\KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObject' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQueryResourceObject + * @return \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObject */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\UnsuppressionCreateJobCreateQueryResourceObject $data data + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObject $data data * * @return self */ diff --git a/lib/Model/ServerBISSubscriptionCreateQueryResourceObject.php b/lib/Model/ServerBISSubscriptionCreateQueryResourceObject.php new file mode 100644 index 0000000..ad6724b --- /dev/null +++ b/lib/Model/ServerBISSubscriptionCreateQueryResourceObject.php @@ -0,0 +1,387 @@ + + */ +class ServerBISSubscriptionCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'relationships' => '\KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationships', + 'attributes' => '\KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\BackInStockSubscriptionEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'relationships' => null, + 'attributes' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'relationships' => 'relationships', + 'attributes' => 'attributes', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'relationships' => 'setRelationships', + 'attributes' => 'setAttributes', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'relationships' => 'getRelationships', + 'attributes' => 'getAttributes', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets relationships + * + * @return \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationships|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationships|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\BackInStockSubscriptionEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\BackInStockSubscriptionEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectAttributes.php b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectAttributes.php new file mode 100644 index 0000000..73d2eaf --- /dev/null +++ b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectAttributes.php @@ -0,0 +1,380 @@ + + */ +class ServerBISSubscriptionCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQueryResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'channels' => 'string[]', + 'profile' => '\KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'channels' => null, + 'profile' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'channels' => 'channels', + 'profile' => 'profile' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'channels' => 'setChannels', + 'profile' => 'setProfile' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'channels' => 'getChannels', + 'profile' => 'getProfile' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const CHANNELS_EMAIL = 'EMAIL'; + public const CHANNELS_PUSH = 'PUSH'; + public const CHANNELS_SMS = 'SMS'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getChannelsAllowableValues() + { + return [ + self::CHANNELS_EMAIL, + self::CHANNELS_PUSH, + self::CHANNELS_SMS, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['channels'] = $data['channels'] ?? null; + $this->container['profile'] = $data['profile'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['channels'] === null) { + $invalidProperties[] = "'channels' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets channels + * + * @return string[] + */ + public function getChannels() + { + return $this->container['channels']; + } + + /** + * Sets channels + * + * @param string[] $channels The channel(s) through which the profile would like to receive the back in stock notification. This can be leveraged within a back in stock flow to notify the subscriber through their preferred channel(s). + * + * @return self + */ + public function setChannels($channels) + { + $allowedValues = $this->getChannelsAllowableValues(); + if (array_diff($channels, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'channels', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['channels'] = $channels; + + return $this; + } + + /** + * Gets profile + * + * @return \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile|null + */ + public function getProfile() + { + return $this->container['profile']; + } + + /** + * Sets profile + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile|null $profile profile + * + * @return self + */ + public function setProfile($profile) + { + $this->container['profile'] = $profile; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile.php b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile.php new file mode 100644 index 0000000..6bdae0d --- /dev/null +++ b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile.php @@ -0,0 +1,324 @@ + + */ +class ServerBISSubscriptionCreateQueryResourceObjectAttributesProfile implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQueryResourceObject_attributes_profile'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\ProfileIdentifierDTOResourceObject' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\ProfileIdentifierDTOResourceObject + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\ProfileIdentifierDTOResourceObject $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationships.php b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationships.php new file mode 100644 index 0000000..bf4d31f --- /dev/null +++ b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationships.php @@ -0,0 +1,321 @@ + + */ +class ServerBISSubscriptionCreateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQueryResourceObject_relationships'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'variant' => '\KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'variant' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'variant' => 'variant' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'variant' => 'setVariant' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'variant' => 'getVariant' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['variant'] = $data['variant'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets variant + * + * @return \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant|null + */ + public function getVariant() + { + return $this->container['variant']; + } + + /** + * Sets variant + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant|null $variant variant + * + * @return self + */ + public function setVariant($variant) + { + $this->container['variant'] = $variant; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant.php b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant.php new file mode 100644 index 0000000..f5fffd7 --- /dev/null +++ b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant.php @@ -0,0 +1,324 @@ + + */ +class ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariant implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQueryResourceObject_relationships_variant'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData.php b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData.php new file mode 100644 index 0000000..c4e929c --- /dev/null +++ b/lib/Model/ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData.php @@ -0,0 +1,389 @@ + + */ +class ServerBISSubscriptionCreateQueryResourceObjectRelationshipsVariantData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ServerBISSubscriptionCreateQueryResourceObject_relationships_variant_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_CATALOG_VARIANT = 'catalog-variant'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_CATALOG_VARIANT, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/StaticScheduleOptions.php b/lib/Model/StaticScheduleOptions.php index c8e40ef..748f352 100644 --- a/lib/Model/StaticScheduleOptions.php +++ b/lib/Model/StaticScheduleOptions.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SubscriptionChannels.php b/lib/Model/SubscriptionChannels.php index 60ce770..66d4d09 100644 --- a/lib/Model/SubscriptionChannels.php +++ b/lib/Model/SubscriptionChannels.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SubscriptionCreateJobCreateQuery.php b/lib/Model/SubscriptionCreateJobCreateQuery.php index 3ecea3c..ec6c146 100644 --- a/lib/Model/SubscriptionCreateJobCreateQuery.php +++ b/lib/Model/SubscriptionCreateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SubscriptionCreateJobCreateQueryResourceObject.php b/lib/Model/SubscriptionCreateJobCreateQueryResourceObject.php index d238c53..81dfdd8 100644 --- a/lib/Model/SubscriptionCreateJobCreateQueryResourceObject.php +++ b/lib/Model/SubscriptionCreateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,6 +58,7 @@ class SubscriptionCreateJobCreateQueryResourceObject implements ModelInterface, * @var string[] */ protected static $openAPITypes = [ + 'relationships' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationships', 'attributes' => '\KlaviyoAPI\Model\SubscriptionCreateJobCreateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\ProfileSubscriptionBulkCreateJobEnum' ]; @@ -70,6 +71,7 @@ class SubscriptionCreateJobCreateQueryResourceObject implements ModelInterface, * @psalm-var array */ protected static $openAPIFormats = [ + 'relationships' => null, 'attributes' => null, 'type' => null ]; @@ -101,6 +103,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'relationships' => 'relationships', 'attributes' => 'attributes', 'type' => 'type' ]; @@ -111,6 +114,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'relationships' => 'setRelationships', 'attributes' => 'setAttributes', 'type' => 'setType' ]; @@ -121,6 +125,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'relationships' => 'getRelationships', 'attributes' => 'getAttributes', 'type' => 'getType' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['relationships'] = $data['relationships'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; $this->container['type'] = $data['type'] ?? null; } @@ -216,6 +222,30 @@ public function valid() } + /** + * Gets relationships + * + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationships|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationships|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** * Gets attributes * diff --git a/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributes.php index e53f6f4..b0c9c91 100644 --- a/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,9 +58,8 @@ class SubscriptionCreateJobCreateQueryResourceObjectAttributes implements ModelI * @var string[] */ protected static $openAPITypes = [ - 'subscriptions' => '\KlaviyoAPI\Model\Subscription[]', - 'custom_source' => 'string', - 'list_id' => 'string' + 'profiles' => '\KlaviyoAPI\Model\SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles', + 'custom_source' => 'string' ]; /** @@ -71,9 +70,8 @@ class SubscriptionCreateJobCreateQueryResourceObjectAttributes implements ModelI * @psalm-var array */ protected static $openAPIFormats = [ - 'subscriptions' => null, - 'custom_source' => null, - 'list_id' => null + 'profiles' => null, + 'custom_source' => null ]; /** @@ -103,9 +101,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'subscriptions' => 'subscriptions', - 'custom_source' => 'custom_source', - 'list_id' => 'list_id' + 'profiles' => 'profiles', + 'custom_source' => 'custom_source' ]; /** @@ -114,9 +111,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'subscriptions' => 'setSubscriptions', - 'custom_source' => 'setCustomSource', - 'list_id' => 'setListId' + 'profiles' => 'setProfiles', + 'custom_source' => 'setCustomSource' ]; /** @@ -125,9 +121,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'subscriptions' => 'getSubscriptions', - 'custom_source' => 'getCustomSource', - 'list_id' => 'getListId' + 'profiles' => 'getProfiles', + 'custom_source' => 'getCustomSource' ]; /** @@ -187,9 +182,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['subscriptions'] = $data['subscriptions'] ?? null; + $this->container['profiles'] = $data['profiles'] ?? null; $this->container['custom_source'] = $data['custom_source'] ?? null; - $this->container['list_id'] = $data['list_id'] ?? null; } /** @@ -201,11 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['subscriptions'] === null) { - $invalidProperties[] = "'subscriptions' can't be null"; - } - if ($this->container['list_id'] === null) { - $invalidProperties[] = "'list_id' can't be null"; + if ($this->container['profiles'] === null) { + $invalidProperties[] = "'profiles' can't be null"; } return $invalidProperties; } @@ -223,25 +214,25 @@ public function valid() /** - * Gets subscriptions + * Gets profiles * - * @return \KlaviyoAPI\Model\Subscription[] + * @return \KlaviyoAPI\Model\SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles */ - public function getSubscriptions() + public function getProfiles() { - return $this->container['subscriptions']; + return $this->container['profiles']; } /** - * Sets subscriptions + * Sets profiles * - * @param \KlaviyoAPI\Model\Subscription[] $subscriptions One or more subscriptions to be created. + * @param \KlaviyoAPI\Model\SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles $profiles profiles * * @return self */ - public function setSubscriptions($subscriptions) + public function setProfiles($profiles) { - $this->container['subscriptions'] = $subscriptions; + $this->container['profiles'] = $profiles; return $this; } @@ -269,30 +260,6 @@ public function setCustomSource($custom_source) return $this; } - - /** - * Gets list_id - * - * @return string - */ - public function getListId() - { - return $this->container['list_id']; - } - - /** - * Sets list_id - * - * @param string $list_id The list to add the newly subscribed profiles to - * - * @return self - */ - public function setListId($list_id) - { - $this->container['list_id'] = $list_id; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles.php b/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles.php new file mode 100644 index 0000000..8cd4c98 --- /dev/null +++ b/lib/Model/SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles.php @@ -0,0 +1,325 @@ + + */ +class SubscriptionCreateJobCreateQueryResourceObjectAttributesProfiles implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionCreateJobCreateQueryResourceObject_attributes_profiles'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\ProfileSubscriptionCreateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\ProfileSubscriptionCreateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\ProfileSubscriptionCreateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/UnsubscriptionCreateJobCreateQuery.php b/lib/Model/SubscriptionDeleteJobCreateQuery.php similarity index 91% rename from lib/Model/UnsubscriptionCreateJobCreateQuery.php rename to lib/Model/SubscriptionDeleteJobCreateQuery.php index 13b8cb5..3bbd5f1 100644 --- a/lib/Model/UnsubscriptionCreateJobCreateQuery.php +++ b/lib/Model/SubscriptionDeleteJobCreateQuery.php @@ -1,6 +1,6 @@ */ -class UnsubscriptionCreateJobCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable +class SubscriptionDeleteJobCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UnsubscriptionCreateJobCreateQuery implements ModelInterface, ArrayAccess, * * @var string */ - protected static $openAPIModelName = 'UnsubscriptionCreateJobCreateQuery'; + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQuery'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class UnsubscriptionCreateJobCreateQuery implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'data' => '\KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQueryResourceObject' + 'data' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObject' ]; /** @@ -210,7 +210,7 @@ public function valid() /** * Gets data * - * @return \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQueryResourceObject + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObject */ public function getData() { @@ -220,7 +220,7 @@ public function getData() /** * Sets data * - * @param \KlaviyoAPI\Model\UnsubscriptionCreateJobCreateQueryResourceObject $data data + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObject $data data * * @return self */ diff --git a/lib/Model/SubscriptionDeleteJobCreateQueryResourceObject.php b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObject.php new file mode 100644 index 0000000..642238a --- /dev/null +++ b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObject.php @@ -0,0 +1,387 @@ + + */ +class SubscriptionDeleteJobCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'relationships' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationships', + 'attributes' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileSubscriptionBulkDeleteJobEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'relationships' => null, + 'attributes' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'relationships' => 'relationships', + 'attributes' => 'attributes', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'relationships' => 'setRelationships', + 'attributes' => 'setAttributes', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'relationships' => 'getRelationships', + 'attributes' => 'getAttributes', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['relationships'] = $data['relationships'] ?? null; + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets relationships + * + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationships|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationships|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileSubscriptionBulkDeleteJobEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileSubscriptionBulkDeleteJobEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectAttributes.php b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectAttributes.php new file mode 100644 index 0000000..78dba58 --- /dev/null +++ b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectAttributes.php @@ -0,0 +1,324 @@ + + */ +class SubscriptionDeleteJobCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQueryResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'profiles' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'profiles' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'profiles' => 'profiles' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'profiles' => 'setProfiles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'profiles' => 'getProfiles' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['profiles'] = $data['profiles'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['profiles'] === null) { + $invalidProperties[] = "'profiles' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets profiles + * + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles + */ + public function getProfiles() + { + return $this->container['profiles']; + } + + /** + * Sets profiles + * + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles $profiles profiles + * + * @return self + */ + public function setProfiles($profiles) + { + $this->container['profiles'] = $profiles; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles.php b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles.php new file mode 100644 index 0000000..32aa9a1 --- /dev/null +++ b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles.php @@ -0,0 +1,325 @@ + + */ +class SubscriptionDeleteJobCreateQueryResourceObjectAttributesProfiles implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQueryResourceObject_attributes_profiles'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\ProfileSubscriptionDeleteQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\ProfileSubscriptionDeleteQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\ProfileSubscriptionDeleteQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationships.php b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationships.php new file mode 100644 index 0000000..e55ac68 --- /dev/null +++ b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationships.php @@ -0,0 +1,321 @@ + + */ +class SubscriptionDeleteJobCreateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQueryResourceObject_relationships'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'list' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'list' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'list' => 'list' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'list' => 'setList' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'list' => 'getList' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['list'] = $data['list'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets list + * + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList|null + */ + public function getList() + { + return $this->container['list']; + } + + /** + * Sets list + * + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList|null $list list + * + * @return self + */ + public function setList($list) + { + $this->container['list'] = $list; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList.php b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList.php new file mode 100644 index 0000000..cb8feaa --- /dev/null +++ b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList.php @@ -0,0 +1,324 @@ + + */ +class SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsList implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQueryResourceObject_relationships_list'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData.php b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData.php new file mode 100644 index 0000000..e57c9ed --- /dev/null +++ b/lib/Model/SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData.php @@ -0,0 +1,389 @@ + + */ +class SubscriptionDeleteJobCreateQueryResourceObjectRelationshipsListData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SubscriptionDeleteJobCreateQueryResourceObject_relationships_list_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE__LIST = 'list'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE__LIST, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SuppressionCreateJobCreateQuery.php b/lib/Model/SuppressionCreateJobCreateQuery.php index 11e9ddc..ded52c1 100644 --- a/lib/Model/SuppressionCreateJobCreateQuery.php +++ b/lib/Model/SuppressionCreateJobCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SuppressionCreateJobCreateQueryResourceObject.php b/lib/Model/SuppressionCreateJobCreateQueryResourceObject.php index 7ccc9ef..7c0e1c5 100644 --- a/lib/Model/SuppressionCreateJobCreateQueryResourceObject.php +++ b/lib/Model/SuppressionCreateJobCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributes.php b/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributes.php index 94a487e..c71840b 100644 --- a/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributes.php +++ b/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,7 @@ class SuppressionCreateJobCreateQueryResourceObjectAttributes implements ModelIn * @var string[] */ protected static $openAPITypes = [ - 'suppressions' => '\KlaviyoAPI\Model\Suppression[]' + 'profiles' => '\KlaviyoAPI\Model\SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles' ]; /** @@ -69,7 +69,7 @@ class SuppressionCreateJobCreateQueryResourceObjectAttributes implements ModelIn * @psalm-var array */ protected static $openAPIFormats = [ - 'suppressions' => null + 'profiles' => null ]; /** @@ -99,7 +99,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'suppressions' => 'suppressions' + 'profiles' => 'profiles' ]; /** @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'suppressions' => 'setSuppressions' + 'profiles' => 'setProfiles' ]; /** @@ -117,7 +117,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'suppressions' => 'getSuppressions' + 'profiles' => 'getProfiles' ]; /** @@ -177,7 +177,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['suppressions'] = $data['suppressions'] ?? null; + $this->container['profiles'] = $data['profiles'] ?? null; } /** @@ -189,8 +189,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['suppressions'] === null) { - $invalidProperties[] = "'suppressions' can't be null"; + if ($this->container['profiles'] === null) { + $invalidProperties[] = "'profiles' can't be null"; } return $invalidProperties; } @@ -208,25 +208,25 @@ public function valid() /** - * Gets suppressions + * Gets profiles * - * @return \KlaviyoAPI\Model\Suppression[] + * @return \KlaviyoAPI\Model\SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles */ - public function getSuppressions() + public function getProfiles() { - return $this->container['suppressions']; + return $this->container['profiles']; } /** - * Sets suppressions + * Sets profiles * - * @param \KlaviyoAPI\Model\Suppression[] $suppressions One or more suppressions to be created. + * @param \KlaviyoAPI\Model\SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles $profiles profiles * * @return self */ - public function setSuppressions($suppressions) + public function setProfiles($profiles) { - $this->container['suppressions'] = $suppressions; + $this->container['profiles'] = $profiles; return $this; } diff --git a/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles.php b/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles.php new file mode 100644 index 0000000..b795127 --- /dev/null +++ b/lib/Model/SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles.php @@ -0,0 +1,325 @@ + + */ +class SuppressionCreateJobCreateQueryResourceObjectAttributesProfiles implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SuppressionCreateJobCreateQueryResourceObject_attributes_profiles'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\ProfileSuppressionCreateQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\ProfileSuppressionCreateQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\ProfileSuppressionCreateQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SuppressionDeleteJobCreateQuery.php b/lib/Model/SuppressionDeleteJobCreateQuery.php new file mode 100644 index 0000000..7aaa5a7 --- /dev/null +++ b/lib/Model/SuppressionDeleteJobCreateQuery.php @@ -0,0 +1,324 @@ + + */ +class SuppressionDeleteJobCreateQuery implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SuppressionDeleteJobCreateQuery'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObject' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObject + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObject $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SuppressionDeleteJobCreateQueryResourceObject.php b/lib/Model/SuppressionDeleteJobCreateQueryResourceObject.php new file mode 100644 index 0000000..af1b539 --- /dev/null +++ b/lib/Model/SuppressionDeleteJobCreateQueryResourceObject.php @@ -0,0 +1,357 @@ + + */ +class SuppressionDeleteJobCreateQueryResourceObject implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SuppressionDeleteJobCreateQueryResourceObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'attributes' => '\KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObjectAttributes', + 'type' => '\KlaviyoAPI\Model\ProfileSuppressionBulkDeleteJobEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'attributes' => null, + 'type' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'attributes' => 'attributes', + 'type' => 'type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'attributes' => 'setAttributes', + 'type' => 'setType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'attributes' => 'getAttributes', + 'type' => 'getType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['attributes'] = $data['attributes'] ?? null; + $this->container['type'] = $data['type'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets attributes + * + * @return \KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObjectAttributes + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObjectAttributes $attributes attributes + * + * @return self + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets type + * + * @return \KlaviyoAPI\Model\ProfileSuppressionBulkDeleteJobEnum + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \KlaviyoAPI\Model\ProfileSuppressionBulkDeleteJobEnum $type type + * + * @return self + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SuppressionDeleteJobCreateQueryResourceObjectAttributes.php b/lib/Model/SuppressionDeleteJobCreateQueryResourceObjectAttributes.php new file mode 100644 index 0000000..8d6981a --- /dev/null +++ b/lib/Model/SuppressionDeleteJobCreateQueryResourceObjectAttributes.php @@ -0,0 +1,324 @@ + + */ +class SuppressionDeleteJobCreateQueryResourceObjectAttributes implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SuppressionDeleteJobCreateQueryResourceObject_attributes'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'profiles' => '\KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'profiles' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'profiles' => 'profiles' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'profiles' => 'setProfiles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'profiles' => 'getProfiles' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['profiles'] = $data['profiles'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['profiles'] === null) { + $invalidProperties[] = "'profiles' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets profiles + * + * @return \KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles + */ + public function getProfiles() + { + return $this->container['profiles']; + } + + /** + * Sets profiles + * + * @param \KlaviyoAPI\Model\SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles $profiles profiles + * + * @return self + */ + public function setProfiles($profiles) + { + $this->container['profiles'] = $profiles; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles.php b/lib/Model/SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles.php new file mode 100644 index 0000000..5dcba30 --- /dev/null +++ b/lib/Model/SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles.php @@ -0,0 +1,325 @@ + + */ +class SuppressionDeleteJobCreateQueryResourceObjectAttributesProfiles implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'SuppressionDeleteJobCreateQueryResourceObject_attributes_profiles'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\ProfileSuppressionDeleteQueryResourceObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\ProfileSuppressionDeleteQueryResourceObject[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\ProfileSuppressionDeleteQueryResourceObject[] $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TagCampaignOp.php b/lib/Model/TagCampaignOp.php index d6a424d..f4216e4 100644 --- a/lib/Model/TagCampaignOp.php +++ b/lib/Model/TagCampaignOp.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagCampaignOpDataInner.php b/lib/Model/TagCampaignOpDataInner.php index edb1bfc..84cea26 100644 --- a/lib/Model/TagCampaignOpDataInner.php +++ b/lib/Model/TagCampaignOpDataInner.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagCreateQuery.php b/lib/Model/TagCreateQuery.php index 977579b..a497227 100644 --- a/lib/Model/TagCreateQuery.php +++ b/lib/Model/TagCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagCreateQueryResourceObject.php b/lib/Model/TagCreateQueryResourceObject.php index efc79ef..ce27460 100644 --- a/lib/Model/TagCreateQueryResourceObject.php +++ b/lib/Model/TagCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,8 @@ class TagCreateQueryResourceObject implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'attributes' => '\KlaviyoAPI\Model\TagCreateQueryResourceObjectAttributes', + 'relationships' => '\KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationships', + 'attributes' => '\KlaviyoAPI\Model\TagUpdateQueryResourceObjectAttributes', 'type' => '\KlaviyoAPI\Model\TagEnum' ]; @@ -70,6 +71,7 @@ class TagCreateQueryResourceObject implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ + 'relationships' => null, 'attributes' => null, 'type' => null ]; @@ -101,6 +103,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'relationships' => 'relationships', 'attributes' => 'attributes', 'type' => 'type' ]; @@ -111,6 +114,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'relationships' => 'setRelationships', 'attributes' => 'setAttributes', 'type' => 'setType' ]; @@ -121,6 +125,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'relationships' => 'getRelationships', 'attributes' => 'getAttributes', 'type' => 'getType' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['relationships'] = $data['relationships'] ?? null; $this->container['attributes'] = $data['attributes'] ?? null; $this->container['type'] = $data['type'] ?? null; } @@ -216,10 +222,34 @@ public function valid() } + /** + * Gets relationships + * + * @return \KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationships|null + */ + public function getRelationships() + { + return $this->container['relationships']; + } + + /** + * Sets relationships + * + * @param \KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationships|null $relationships relationships + * + * @return self + */ + public function setRelationships($relationships) + { + $this->container['relationships'] = $relationships; + + return $this; + } + /** * Gets attributes * - * @return \KlaviyoAPI\Model\TagCreateQueryResourceObjectAttributes + * @return \KlaviyoAPI\Model\TagUpdateQueryResourceObjectAttributes */ public function getAttributes() { @@ -229,7 +259,7 @@ public function getAttributes() /** * Sets attributes * - * @param \KlaviyoAPI\Model\TagCreateQueryResourceObjectAttributes $attributes attributes + * @param \KlaviyoAPI\Model\TagUpdateQueryResourceObjectAttributes $attributes attributes * * @return self */ diff --git a/lib/Model/TagCreateQueryResourceObjectRelationships.php b/lib/Model/TagCreateQueryResourceObjectRelationships.php new file mode 100644 index 0000000..682b0ad --- /dev/null +++ b/lib/Model/TagCreateQueryResourceObjectRelationships.php @@ -0,0 +1,321 @@ + + */ +class TagCreateQueryResourceObjectRelationships implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TagCreateQueryResourceObject_relationships'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'tag_group' => '\KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationshipsTagGroup' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'tag_group' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'tag_group' => 'tag-group' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'tag_group' => 'setTagGroup' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'tag_group' => 'getTagGroup' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['tag_group'] = $data['tag_group'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets tag_group + * + * @return \KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationshipsTagGroup|null + */ + public function getTagGroup() + { + return $this->container['tag_group']; + } + + /** + * Sets tag_group + * + * @param \KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationshipsTagGroup|null $tag_group tag_group + * + * @return self + */ + public function setTagGroup($tag_group) + { + $this->container['tag_group'] = $tag_group; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TagCreateQueryResourceObjectRelationshipsTagGroup.php b/lib/Model/TagCreateQueryResourceObjectRelationshipsTagGroup.php new file mode 100644 index 0000000..f72d1c9 --- /dev/null +++ b/lib/Model/TagCreateQueryResourceObjectRelationshipsTagGroup.php @@ -0,0 +1,324 @@ + + */ +class TagCreateQueryResourceObjectRelationshipsTagGroup implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TagCreateQueryResourceObject_relationships_tag_group'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'data' => '\KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationshipsTagGroupData' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = $data['data'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationshipsTagGroupData + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \KlaviyoAPI\Model\TagCreateQueryResourceObjectRelationshipsTagGroupData $data data + * + * @return self + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TagCreateQueryResourceObjectRelationshipsTagGroupData.php b/lib/Model/TagCreateQueryResourceObjectRelationshipsTagGroupData.php new file mode 100644 index 0000000..660227c --- /dev/null +++ b/lib/Model/TagCreateQueryResourceObjectRelationshipsTagGroupData.php @@ -0,0 +1,389 @@ + + */ +class TagCreateQueryResourceObjectRelationshipsTagGroupData implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'TagCreateQueryResourceObject_relationships_tag_group_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'type' => 'string', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'type' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => 'type', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + public const TYPE_TAG_GROUP = 'tag-group'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_TAG_GROUP, + ]; + } + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data['type'] ?? null; + $this->container['id'] = $data['id'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'type', must be one of '%s'", + $this->container['type'], + implode("', '", $allowedValues) + ); + } + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return self + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'type', must be one of '%s'", + $type, + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/lib/Model/TagEnum.php b/lib/Model/TagEnum.php index 4ba9982..16316cd 100644 --- a/lib/Model/TagEnum.php +++ b/lib/Model/TagEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagFlowOp.php b/lib/Model/TagFlowOp.php index f869112..6d8d48e 100644 --- a/lib/Model/TagFlowOp.php +++ b/lib/Model/TagFlowOp.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagFlowOpDataInner.php b/lib/Model/TagFlowOpDataInner.php index 3e3fa49..c03aa09 100644 --- a/lib/Model/TagFlowOpDataInner.php +++ b/lib/Model/TagFlowOpDataInner.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupCreateQuery.php b/lib/Model/TagGroupCreateQuery.php index 94308d2..3ff0612 100644 --- a/lib/Model/TagGroupCreateQuery.php +++ b/lib/Model/TagGroupCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupCreateQueryResourceObject.php b/lib/Model/TagGroupCreateQueryResourceObject.php index 20ae958..1cfb2ab 100644 --- a/lib/Model/TagGroupCreateQueryResourceObject.php +++ b/lib/Model/TagGroupCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupCreateQueryResourceObjectAttributes.php b/lib/Model/TagGroupCreateQueryResourceObjectAttributes.php index c2d0239..ab27d58 100644 --- a/lib/Model/TagGroupCreateQueryResourceObjectAttributes.php +++ b/lib/Model/TagGroupCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupEnum.php b/lib/Model/TagGroupEnum.php index aac75f9..f2b7292 100644 --- a/lib/Model/TagGroupEnum.php +++ b/lib/Model/TagGroupEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupUpdateQuery.php b/lib/Model/TagGroupUpdateQuery.php index a8a7685..e170535 100644 --- a/lib/Model/TagGroupUpdateQuery.php +++ b/lib/Model/TagGroupUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupUpdateQueryResourceObject.php b/lib/Model/TagGroupUpdateQueryResourceObject.php index 90af632..bcd5254 100644 --- a/lib/Model/TagGroupUpdateQueryResourceObject.php +++ b/lib/Model/TagGroupUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagGroupUpdateQueryResourceObjectAttributes.php b/lib/Model/TagGroupUpdateQueryResourceObjectAttributes.php index 559a01a..5fb2e6b 100644 --- a/lib/Model/TagGroupUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/TagGroupUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagListOp.php b/lib/Model/TagListOp.php index d3bd9be..7c307b4 100644 --- a/lib/Model/TagListOp.php +++ b/lib/Model/TagListOp.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagListOpDataInner.php b/lib/Model/TagListOpDataInner.php index 9a4e03b..1f77b15 100644 --- a/lib/Model/TagListOpDataInner.php +++ b/lib/Model/TagListOpDataInner.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagSegmentOp.php b/lib/Model/TagSegmentOp.php index b0658ee..daa2e7e 100644 --- a/lib/Model/TagSegmentOp.php +++ b/lib/Model/TagSegmentOp.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagSegmentOpDataInner.php b/lib/Model/TagSegmentOpDataInner.php index d541dd2..a35f803 100644 --- a/lib/Model/TagSegmentOpDataInner.php +++ b/lib/Model/TagSegmentOpDataInner.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagUpdateQuery.php b/lib/Model/TagUpdateQuery.php index 2ca0518..f7e4196 100644 --- a/lib/Model/TagUpdateQuery.php +++ b/lib/Model/TagUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagUpdateQueryResourceObject.php b/lib/Model/TagUpdateQueryResourceObject.php index 4fa0ee2..5fb54ac 100644 --- a/lib/Model/TagUpdateQueryResourceObject.php +++ b/lib/Model/TagUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TagUpdateQueryResourceObjectAttributes.php b/lib/Model/TagUpdateQueryResourceObjectAttributes.php index 65884ae..4e82620 100644 --- a/lib/Model/TagUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/TagUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateCloneQuery.php b/lib/Model/TemplateCloneQuery.php index efbc445..bc96dac 100644 --- a/lib/Model/TemplateCloneQuery.php +++ b/lib/Model/TemplateCloneQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateCloneQueryResourceObject.php b/lib/Model/TemplateCloneQueryResourceObject.php index 26dcb63..e39ed45 100644 --- a/lib/Model/TemplateCloneQueryResourceObject.php +++ b/lib/Model/TemplateCloneQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateCloneQueryResourceObjectAttributes.php b/lib/Model/TemplateCloneQueryResourceObjectAttributes.php index ebb8580..37d1182 100644 --- a/lib/Model/TemplateCloneQueryResourceObjectAttributes.php +++ b/lib/Model/TemplateCloneQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,6 @@ class TemplateCloneQueryResourceObjectAttributes implements ModelInterface, Arra * @var string[] */ protected static $openAPITypes = [ - 'return_fields' => 'string[]', 'id' => 'string', 'name' => 'string' ]; @@ -71,7 +70,6 @@ class TemplateCloneQueryResourceObjectAttributes implements ModelInterface, Arra * @psalm-var array */ protected static $openAPIFormats = [ - 'return_fields' => null, 'id' => null, 'name' => null ]; @@ -103,7 +101,6 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'return_fields' => 'return_fields', 'id' => 'id', 'name' => 'name' ]; @@ -114,7 +111,6 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'return_fields' => 'setReturnFields', 'id' => 'setId', 'name' => 'setName' ]; @@ -125,7 +121,6 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'return_fields' => 'getReturnFields', 'id' => 'getId', 'name' => 'getName' ]; @@ -187,7 +182,6 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['return_fields'] = $data['return_fields'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['name'] = $data['name'] ?? null; } @@ -219,30 +213,6 @@ public function valid() } - /** - * Gets return_fields - * - * @return string[]|null - */ - public function getReturnFields() - { - return $this->container['return_fields']; - } - - /** - * Sets return_fields - * - * @param string[]|null $return_fields Any subset of TemplateResponse fields - * - * @return self - */ - public function setReturnFields($return_fields) - { - $this->container['return_fields'] = $return_fields; - - return $this; - } - /** * Gets id * diff --git a/lib/Model/TemplateCreateQuery.php b/lib/Model/TemplateCreateQuery.php index ef20568..33cd4c6 100644 --- a/lib/Model/TemplateCreateQuery.php +++ b/lib/Model/TemplateCreateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateCreateQueryResourceObject.php b/lib/Model/TemplateCreateQueryResourceObject.php index 706d9e9..da80335 100644 --- a/lib/Model/TemplateCreateQueryResourceObject.php +++ b/lib/Model/TemplateCreateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateCreateQueryResourceObjectAttributes.php b/lib/Model/TemplateCreateQueryResourceObjectAttributes.php index 2652f84..e4e5268 100644 --- a/lib/Model/TemplateCreateQueryResourceObjectAttributes.php +++ b/lib/Model/TemplateCreateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -60,7 +60,6 @@ class TemplateCreateQueryResourceObjectAttributes implements ModelInterface, Arr protected static $openAPITypes = [ 'text' => 'string', 'html' => 'string', - 'return_fields' => 'string[]', 'name' => 'string', 'editor_type' => 'string' ]; @@ -75,7 +74,6 @@ class TemplateCreateQueryResourceObjectAttributes implements ModelInterface, Arr protected static $openAPIFormats = [ 'text' => null, 'html' => null, - 'return_fields' => null, 'name' => null, 'editor_type' => null ]; @@ -109,7 +107,6 @@ public static function openAPIFormats() protected static $attributeMap = [ 'text' => 'text', 'html' => 'html', - 'return_fields' => 'return_fields', 'name' => 'name', 'editor_type' => 'editor_type' ]; @@ -122,7 +119,6 @@ public static function openAPIFormats() protected static $setters = [ 'text' => 'setText', 'html' => 'setHtml', - 'return_fields' => 'setReturnFields', 'name' => 'setName', 'editor_type' => 'setEditorType' ]; @@ -135,7 +131,6 @@ public static function openAPIFormats() protected static $getters = [ 'text' => 'getText', 'html' => 'getHtml', - 'return_fields' => 'getReturnFields', 'name' => 'getName', 'editor_type' => 'getEditorType' ]; @@ -199,7 +194,6 @@ public function __construct(array $data = null) { $this->container['text'] = $data['text'] ?? null; $this->container['html'] = $data['html'] ?? null; - $this->container['return_fields'] = $data['return_fields'] ?? null; $this->container['name'] = $data['name'] ?? null; $this->container['editor_type'] = $data['editor_type'] ?? null; } @@ -282,30 +276,6 @@ public function setHtml($html) return $this; } - /** - * Gets return_fields - * - * @return string[]|null - */ - public function getReturnFields() - { - return $this->container['return_fields']; - } - - /** - * Sets return_fields - * - * @param string[]|null $return_fields Provide fields to limit the returned data - * - * @return self - */ - public function setReturnFields($return_fields) - { - $this->container['return_fields'] = $return_fields; - - return $this; - } - /** * Gets name * diff --git a/lib/Model/TemplateEnum.php b/lib/Model/TemplateEnum.php index e01c26e..f0635ca 100644 --- a/lib/Model/TemplateEnum.php +++ b/lib/Model/TemplateEnum.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateRenderQuery.php b/lib/Model/TemplateRenderQuery.php index 952fb43..4d46ca9 100644 --- a/lib/Model/TemplateRenderQuery.php +++ b/lib/Model/TemplateRenderQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateRenderQueryResourceObject.php b/lib/Model/TemplateRenderQueryResourceObject.php index 5a2506b..f98c156 100644 --- a/lib/Model/TemplateRenderQueryResourceObject.php +++ b/lib/Model/TemplateRenderQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateRenderQueryResourceObjectAttributes.php b/lib/Model/TemplateRenderQueryResourceObjectAttributes.php index 1dcb2ac..dcc32a8 100644 --- a/lib/Model/TemplateRenderQueryResourceObjectAttributes.php +++ b/lib/Model/TemplateRenderQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -58,7 +58,6 @@ class TemplateRenderQueryResourceObjectAttributes implements ModelInterface, Arr * @var string[] */ protected static $openAPITypes = [ - 'return_fields' => 'string[]', 'id' => 'string', 'context' => 'object' ]; @@ -71,7 +70,6 @@ class TemplateRenderQueryResourceObjectAttributes implements ModelInterface, Arr * @psalm-var array */ protected static $openAPIFormats = [ - 'return_fields' => null, 'id' => null, 'context' => null ]; @@ -103,7 +101,6 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'return_fields' => 'return_fields', 'id' => 'id', 'context' => 'context' ]; @@ -114,7 +111,6 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'return_fields' => 'setReturnFields', 'id' => 'setId', 'context' => 'setContext' ]; @@ -125,7 +121,6 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'return_fields' => 'getReturnFields', 'id' => 'getId', 'context' => 'getContext' ]; @@ -187,7 +182,6 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['return_fields'] = $data['return_fields'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['context'] = $data['context'] ?? null; } @@ -222,30 +216,6 @@ public function valid() } - /** - * Gets return_fields - * - * @return string[]|null - */ - public function getReturnFields() - { - return $this->container['return_fields']; - } - - /** - * Sets return_fields - * - * @param string[]|null $return_fields Provide fields to limit the returned data - * - * @return self - */ - public function setReturnFields($return_fields) - { - $this->container['return_fields'] = $return_fields; - - return $this; - } - /** * Gets id * diff --git a/lib/Model/TemplateUpdateQuery.php b/lib/Model/TemplateUpdateQuery.php index 3bb845b..6f2d1dd 100644 --- a/lib/Model/TemplateUpdateQuery.php +++ b/lib/Model/TemplateUpdateQuery.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateUpdateQueryResourceObject.php b/lib/Model/TemplateUpdateQueryResourceObject.php index 9d5578e..9eddfad 100644 --- a/lib/Model/TemplateUpdateQueryResourceObject.php +++ b/lib/Model/TemplateUpdateQueryResourceObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/TemplateUpdateQueryResourceObjectAttributes.php b/lib/Model/TemplateUpdateQueryResourceObjectAttributes.php index 0f81a11..fb1eb1e 100644 --- a/lib/Model/TemplateUpdateQueryResourceObjectAttributes.php +++ b/lib/Model/TemplateUpdateQueryResourceObjectAttributes.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 @@ -60,8 +60,7 @@ class TemplateUpdateQueryResourceObjectAttributes implements ModelInterface, Arr protected static $openAPITypes = [ 'text' => 'string', 'html' => 'string', - 'name' => 'string', - 'return_fields' => 'string[]' + 'name' => 'string' ]; /** @@ -74,8 +73,7 @@ class TemplateUpdateQueryResourceObjectAttributes implements ModelInterface, Arr protected static $openAPIFormats = [ 'text' => null, 'html' => null, - 'name' => null, - 'return_fields' => null + 'name' => null ]; /** @@ -107,8 +105,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'text' => 'text', 'html' => 'html', - 'name' => 'name', - 'return_fields' => 'return_fields' + 'name' => 'name' ]; /** @@ -119,8 +116,7 @@ public static function openAPIFormats() protected static $setters = [ 'text' => 'setText', 'html' => 'setHtml', - 'name' => 'setName', - 'return_fields' => 'setReturnFields' + 'name' => 'setName' ]; /** @@ -131,8 +127,7 @@ public static function openAPIFormats() protected static $getters = [ 'text' => 'getText', 'html' => 'getHtml', - 'name' => 'getName', - 'return_fields' => 'getReturnFields' + 'name' => 'getName' ]; /** @@ -195,7 +190,6 @@ public function __construct(array $data = null) $this->container['text'] = $data['text'] ?? null; $this->container['html'] = $data['html'] ?? null; $this->container['name'] = $data['name'] ?? null; - $this->container['return_fields'] = $data['return_fields'] ?? null; } /** @@ -293,30 +287,6 @@ public function setName($name) return $this; } - - /** - * Gets return_fields - * - * @return string[]|null - */ - public function getReturnFields() - { - return $this->container['return_fields']; - } - - /** - * Sets return_fields - * - * @param string[]|null $return_fields Provide fields to limit the returned data - * - * @return self - */ - public function setReturnFields($return_fields) - { - $this->container['return_fields'] = $return_fields; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ThrottledScheduleOptions.php b/lib/Model/ThrottledScheduleOptions.php index cb8e9c6..d94e987 100644 --- a/lib/Model/ThrottledScheduleOptions.php +++ b/lib/Model/ThrottledScheduleOptions.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/Model/UTMParamsSubObject.php b/lib/Model/UTMParamsSubObject.php index bc81c1f..1820759 100644 --- a/lib/Model/UTMParamsSubObject.php +++ b/lib/Model/UTMParamsSubObject.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0 diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 077dae2..c56fea2 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -15,7 +15,7 @@ * * The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. * - * The version of the OpenAPI document: 2023-06-15 + * The version of the OpenAPI document: 2023-07-15 * Contact: developers@klaviyo.com * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 6.1.0