From ce9fab28261c84f7bbf06bffc068cf1e5e39e3a2 Mon Sep 17 00:00:00 2001
From: p-zielinski <82354717+p-zielinski@users.noreply.github.com>
Date: Thu, 28 Nov 2024 10:58:14 +0100
Subject: [PATCH] v5.0.2 (#92)
---
ENDPOINTS-COVERAGE.md | 124 +--
README.md | 13 +-
composer.json | 2 +-
docs/Api/CampaignsApi.md | 6 +-
docs/Api/VouchersApi.md | 12 +-
docs/Model/Campaign.md | 4 +-
docs/Model/CampaignBase.md | 4 +-
docs/Model/CampaignsCreateRequestBody.md | 2 +-
docs/Model/CampaignsCreateResponseBody.md | 4 +-
docs/Model/CampaignsGetResponseBody.md | 4 +-
docs/Model/CampaignsUpdateRequestBody.md | 4 +-
docs/Model/CampaignsUpdateResponseBody.md | 4 +-
...ionsValidateResponseBodyRedeemablesItem.md | 5 +-
docs/Model/Error.md | 1 +
docs/Model/ErrorError.md | 9 +
.../LoyaltiesCreateCampaignRequestBody.md | 2 +-
...yaltiesMembersBalanceUpdateResponseBody.md | 2 +-
...ointsExpirationListResponseBodyDataItem.md | 18 +-
...xpirationListResponseBodyDataItemBucket.md | 2 +-
.../LoyaltiesUpdateCampaignRequestBody.md | 4 +-
docs/Model/LoyaltyCardTransaction.md | 4 +-
.../LoyaltyCardTransactionDetailsBalance.md | 9 +-
...dTransactionDetailsBalanceRelatedObject.md | 2 +-
docs/Model/LoyaltyPointsBucket.md | 17 +
docs/Model/LoyaltyPointsBucketBucket.md | 9 +
docs/Model/Order.md | 2 +-
docs/Model/OrderCalculated.md | 2 +-
docs/Model/OrderCalculatedItem.md | 2 +-
docs/Model/OrderCalculatedItemProduct.md | 2 +-
docs/Model/OrderCalculatedItemSku.md | 1 +
docs/Model/OrderItem.md | 2 +-
docs/Model/OrderItemProduct.md | 2 +-
docs/Model/OrderItemSku.md | 1 +
docs/Model/OrdersCreateRequestBody.md | 2 +-
docs/Model/OrdersCreateResponseBody.md | 2 +-
docs/Model/OrdersGetResponseBody.md | 2 +-
.../OrdersImportCreateRequestBodyItem.md | 2 +-
docs/Model/OrdersUpdateRequestBody.md | 2 +-
docs/Model/OrdersUpdateResponseBody.md | 2 +-
docs/Model/Product.md | 2 +-
...ectionsProductsListResponseBodyDataItem.md | 2 +-
docs/Model/ProductWithoutSkus.md | 2 +-
docs/Model/ProductsCreateResponseBody.md | 2 +-
docs/Model/ProductsGetResponseBody.md | 2 +-
docs/Model/ProductsSkusCreateResponseBody.md | 2 +-
docs/Model/ProductsSkusUpdateResponseBody.md | 2 +-
docs/Model/ProductsUpdateResponseBody.md | 2 +-
docs/Model/RedemptionEntryOrder.md | 2 +-
docs/Model/RedemptionsGetResponseBodyOrder.md | 2 +-
...onsListResponseBodyRedemptionsItemOrder.md | 2 +-
docs/Model/Sku.md | 2 +-
docs/Model/SkusGetResponseBody.md | 2 +-
...CampaignsCampaignSetupCreateRequestBody.md | 2 +-
.../ValidationsRedeemableInapplicable.md | 5 +-
docs/Model/ValidationsRedeemableSkipped.md | 5 +-
...ionsValidateResponseBodyRedeemablesItem.md | 5 +-
docs/Model/VoucherBalance.md | 15 +
docs/Model/VoucherBalanceRelatedObject.md | 10 +
docs/Model/VoucherTransaction.md | 4 +-
.../Model/VoucherTransactionDetailsBalance.md | 9 +-
...rTransactionDetailsBalanceRelatedObject.md | 2 +-
.../VouchersBalanceUpdateResponseBody.md | 2 +-
src/Api/CampaignsApi.php | 10 +-
src/Api/VouchersApi.php | 10 +-
src/Configuration.php | 4 +-
.../AccessSettingsCampaignAssignmentsList.php | 2 +-
src/Model/Campaign.php | 6 +-
src/Model/CampaignBase.php | 6 +-
src/Model/CampaignsCreateRequestBody.php | 2 +-
src/Model/CampaignsCreateResponseBody.php | 6 +-
src/Model/CampaignsGetResponseBody.php | 6 +-
src/Model/CampaignsUpdateRequestBody.php | 4 +-
src/Model/CampaignsUpdateResponseBody.php | 6 +-
...onsValidateResponseBodyRedeemablesItem.php | 57 +-
src/Model/Error.php | 53 +-
src/Model/ErrorError.php | 418 ++++++++++
.../LoyaltiesCreateCampaignRequestBody.php | 2 +-
...altiesMembersBalanceUpdateResponseBody.php | 2 +-
...intsExpirationListResponseBodyDataItem.php | 223 ++---
...pirationListResponseBodyDataItemBucket.php | 20 +-
.../LoyaltiesUpdateCampaignRequestBody.php | 4 +-
src/Model/LoyaltyCardTransaction.php | 146 ++--
src/Model/LoyaltyCardTransactionDetails.php | 11 +-
.../LoyaltyCardTransactionDetailsBalance.php | 99 ++-
...TransactionDetailsBalanceRelatedObject.php | 11 +-
src/Model/LoyaltyPointsBucket.php | 778 ++++++++++++++++++
src/Model/LoyaltyPointsBucketBucket.php | 418 ++++++++++
src/Model/Order.php | 2 +-
src/Model/OrderCalculated.php | 2 +-
src/Model/OrderCalculatedItem.php | 2 +-
src/Model/OrderCalculatedItemProduct.php | 2 +-
src/Model/OrderCalculatedItemSku.php | 53 +-
src/Model/OrderItem.php | 2 +-
src/Model/OrderItemProduct.php | 2 +-
src/Model/OrderItemSku.php | 53 +-
src/Model/OrdersCreateRequestBody.php | 2 +-
src/Model/OrdersCreateResponseBody.php | 2 +-
src/Model/OrdersGetResponseBody.php | 2 +-
.../OrdersImportCreateRequestBodyItem.php | 2 +-
src/Model/OrdersUpdateRequestBody.php | 2 +-
src/Model/OrdersUpdateResponseBody.php | 2 +-
src/Model/ParameterExpandListCampaigns.php | 2 +
src/Model/Product.php | 2 +-
...ctionsProductsListResponseBodyDataItem.php | 2 +-
src/Model/ProductWithoutSkus.php | 2 +-
src/Model/ProductsCreateResponseBody.php | 2 +-
src/Model/ProductsGetResponseBody.php | 2 +-
src/Model/ProductsSkusCreateResponseBody.php | 2 +-
src/Model/ProductsSkusUpdateResponseBody.php | 2 +-
src/Model/ProductsUpdateResponseBody.php | 2 +-
src/Model/RedemptionEntryOrder.php | 2 +-
src/Model/RedemptionsGetResponseBodyOrder.php | 2 +-
...nsListResponseBodyRedemptionsItemOrder.php | 2 +-
src/Model/Sku.php | 2 +-
src/Model/SkusGetResponseBody.php | 2 +-
...ampaignsCampaignSetupCreateRequestBody.php | 2 +-
.../ValidationsRedeemableInapplicable.php | 57 +-
src/Model/ValidationsRedeemableSkipped.php | 57 +-
...onsValidateResponseBodyRedeemablesItem.php | 57 +-
src/Model/VoucherBalance.php | 764 +++++++++++++++++
src/Model/VoucherBalanceRelatedObject.php | 491 +++++++++++
src/Model/VoucherTransaction.php | 172 ++--
src/Model/VoucherTransactionDetails.php | 11 +-
.../VoucherTransactionDetailsBalance.php | 99 ++-
...TransactionDetailsBalanceRelatedObject.php | 11 +-
.../VouchersBalanceUpdateResponseBody.php | 2 +-
126 files changed, 3945 insertions(+), 618 deletions(-)
create mode 100644 docs/Model/ErrorError.md
create mode 100644 docs/Model/LoyaltyPointsBucket.md
create mode 100644 docs/Model/LoyaltyPointsBucketBucket.md
create mode 100644 docs/Model/VoucherBalance.md
create mode 100644 docs/Model/VoucherBalanceRelatedObject.md
create mode 100644 src/Model/ErrorError.php
create mode 100644 src/Model/LoyaltyPointsBucket.php
create mode 100644 src/Model/LoyaltyPointsBucketBucket.php
create mode 100644 src/Model/VoucherBalance.php
create mode 100644 src/Model/VoucherBalanceRelatedObject.php
diff --git a/ENDPOINTS-COVERAGE.md b/ENDPOINTS-COVERAGE.md
index db6317d..126b909 100644
--- a/ENDPOINTS-COVERAGE.md
+++ b/ENDPOINTS-COVERAGE.md
@@ -79,20 +79,22 @@
| /v1/vouchers/{code}/sessions/{sessionKey} | delete | Release Validation Session | supported | |
| /v1/vouchers/qualification | post | Examine Qualification [Deprecated] | | deprecated |
## Campaigns
-| endpoint | method | summary | is supported | is deprecated |
-| ------------------------------------------ | ------ | ------------------------------------------ | ------------------------------------ | ------------------------------------ |
-| /v1/campaigns | post | Create Campaign | supported | |
-| /v1/campaigns | get | List Campaigns | supported | |
-| /v1/campaigns/{campaignId} | get | Get Campaign | supported | |
-| /v1/campaigns/{campaignId} | put | Update Campaign | supported | |
-| /v1/campaigns/{campaignId} | delete | Delete Campaign | supported | |
-| /v1/campaigns/{campaignId}/vouchers | post | Add Vouchers to Campaign | supported | |
-| /v1/campaigns/{campaignId}/vouchers/{code} | post | Add Voucher with Specific Code to Campaign | supported | |
-| /v1/campaigns/{campaignId}/import | post | Import Vouchers to Campaign | supported | |
-| /v1/campaigns/{campaignId}/importCSV | post | Import Vouchers to Campaign by CSV | supported | |
-| /v1/campaigns/qualification | post | Examine Qualification [Deprecated] | | deprecated |
-| /v1/campaigns/{campaignId}/enable | post | Enable Campaign | supported | |
-| /v1/campaigns/{campaignId}/disable | post | Disable Campaign | supported | |
+| endpoint | method | summary | is supported | is deprecated |
+| ---------------------------------------------- | ------ | ------------------------------------------ | ------------------------------------ | ------------------------------------ |
+| /v1/campaigns | post | Create Campaign | supported | |
+| /v1/campaigns | get | List Campaigns | supported | |
+| /v1/campaigns/{campaignId} | get | Get Campaign | supported | |
+| /v1/campaigns/{campaignId} | put | Update Campaign | supported | |
+| /v1/campaigns/{campaignId} | delete | Delete Campaign | supported | |
+| /v1/campaigns/{campaignId}/vouchers | post | Add Vouchers to Campaign | supported | |
+| /v1/campaigns/{campaignId}/vouchers/{code} | post | Add Voucher with Specific Code to Campaign | supported | |
+| /v1/campaigns/{campaignId}/import | post | Import Vouchers to Campaign | supported | |
+| /v1/campaigns/{campaignId}/importCSV | post | Import Vouchers to Campaign by CSV | supported | |
+| /v1/campaigns/qualification | post | Examine Qualification [Deprecated] | | deprecated |
+| /v1/campaigns/{campaignId}/enable | post | Enable Campaign | supported | |
+| /v1/campaigns/{campaignId}/disable | post | Disable Campaign | supported | |
+| /v1/campaigns/{campaignId}/transactions | get | List Campaign Transactions | | |
+| /v1/campaigns/{campaignId}/transactions/export | post | Export Campaign Transactions | | |
## Promotions
| endpoint | method | summary | is supported | is deprecated |
| ---------------------------------------------- | ------ | ---------------------------------- | ------------------------------------ | ------------- |
@@ -124,52 +126,54 @@
| /v1/rewards/{rewardId}/assignments/{assignmentId} | delete | Delete Reward Assignment | supported | |
| /v1/rewards/{rewardId}/assignments/{assignmentId} | get | Get Reward Assignment | supported | |
## Loyalties
-| endpoint | method | summary | is supported | is deprecated |
-| ------------------------------------------------------------------- | ------ | ---------------------------------- | ------------------------------------ | ------------- |
-| /v1/loyalties | get | List Loyalty Campaigns | supported | |
-| /v1/loyalties | post | Create Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId} | get | Get Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId} | put | Update Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId} | delete | Delete Loyalty Campaign | supported | |
-| /v1/loyalties/{campaignId}/members | get | List Members | supported | |
-| /v1/loyalties/{campaignId}/members | post | Add Member | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId} | get | Get Member | supported | |
-| /v1/loyalties/members/{memberId} | get | Get Member | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/activity | get | List Member Activity | supported | |
-| /v1/loyalties/members/{memberId}/activity | get | List Member Activity | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
-| /v1/loyalties/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/transfers | post | Transfer Loyalty Points | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
-| /v1/loyalties/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
-| /v1/loyalties/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | get | Get Points Expiration | supported | |
-| /v1/loyalties/{campaignId}/points-expiration/export | post | Create Points Expiration Export | supported | |
-| /v1/loyalties/{campaignId}/earning-rules | get | List Earning Rules | supported | |
-| /v1/loyalties/{campaignId}/earning-rules | post | Create Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | get | Get Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | put | Update Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | delete | Delete Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | post | Enable Earning Rule | supported | |
-| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | post | Disable Earning Rule | supported | |
-| /v1/loyalties/members/{memberId}/rewards | get | List Member Rewards | supported | |
-| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | get | Get Reward Details | supported | |
-| /v1/loyalties/{campaignId}/reward-assignments | get | List Reward Assignments | supported | |
-| /v1/loyalties/{campaignId}/rewards | get | List Reward Assignments | supported | |
-| /v1/loyalties/{campaignId}/rewards | post | Create Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | get | Get Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/rewards/{assignmentId} | get | Get Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/rewards/{assignmentId} | put | Update Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/rewards/{assignmentId} | delete | Delete Reward Assignment | supported | |
-| /v1/loyalties/{campaignId}/members/{memberId}/redemption | post | Redeem Reward | supported | |
-| /v1/loyalties/members/{memberId}/redemption | post | Redeem Reward | supported | |
-| /v1/loyalties/{campaignId}/tiers | get | List Loyalty Tiers | supported | |
-| /v1/loyalties/{campaignId}/tiers | post | Create loyalty tiers | supported | |
-| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | get | Get Loyalty Tier | supported | |
-| /v1/loyalties/members/{memberId}/tiers | get | List Member's Loyalty Tiers | supported | |
-| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | get | List Loyalty Tier Earning Rules | supported | |
-| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | get | List Loyalty Tier Rewards | supported | |
+| endpoint | method | summary | is supported | is deprecated |
+| ------------------------------------------------------------------- | ------ | ------------------------------------ | ------------------------------------ | ------------- |
+| /v1/loyalties | get | List Loyalty Campaigns | supported | |
+| /v1/loyalties | post | Create Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId} | get | Get Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId} | put | Update Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId} | delete | Delete Loyalty Campaign | supported | |
+| /v1/loyalties/{campaignId}/members | get | List Members | supported | |
+| /v1/loyalties/{campaignId}/members | post | Add Member | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId} | get | Get Member | supported | |
+| /v1/loyalties/members/{memberId} | get | Get Member | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/activity | get | List Member Activity | supported | |
+| /v1/loyalties/members/{memberId}/activity | get | List Member Activity | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
+| /v1/loyalties/members/{memberId}/balance | post | Add or Remove Loyalty Card Balance | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/transfers | post | Transfer Loyalty Points | supported | |
+| /v1/loyalties/{campaignId}/transactions | get | List Loyalty Campaign Transactions | | |
+| /v1/loyalties/{campaignId}/transactions/export | post | Export Loyalty Campaign Transactions | | |
+| /v1/loyalties/{campaignId}/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
+| /v1/loyalties/members/{memberId}/transactions | get | List Loyalty Card Transactions | supported | |
+| /v1/loyalties/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | post | Export Loyalty Card Transactions | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | get | Get Points Expiration | supported | |
+| /v1/loyalties/{campaignId}/points-expiration/export | post | Create Points Expiration Export | supported | |
+| /v1/loyalties/{campaignId}/earning-rules | get | List Earning Rules | supported | |
+| /v1/loyalties/{campaignId}/earning-rules | post | Create Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | get | Get Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | put | Update Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | delete | Delete Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | post | Enable Earning Rule | supported | |
+| /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | post | Disable Earning Rule | supported | |
+| /v1/loyalties/members/{memberId}/rewards | get | List Member Rewards | supported | |
+| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | get | Get Reward Details | supported | |
+| /v1/loyalties/{campaignId}/reward-assignments | get | List Reward Assignments | supported | |
+| /v1/loyalties/{campaignId}/rewards | get | List Reward Assignments | supported | |
+| /v1/loyalties/{campaignId}/rewards | post | Create Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | get | Get Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/rewards/{assignmentId} | get | Get Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/rewards/{assignmentId} | put | Update Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/rewards/{assignmentId} | delete | Delete Reward Assignment | supported | |
+| /v1/loyalties/{campaignId}/members/{memberId}/redemption | post | Redeem Reward | supported | |
+| /v1/loyalties/members/{memberId}/redemption | post | Redeem Reward | supported | |
+| /v1/loyalties/{campaignId}/tiers | get | List Loyalty Tiers | supported | |
+| /v1/loyalties/{campaignId}/tiers | post | Create loyalty tiers | supported | |
+| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | get | Get Loyalty Tier | supported | |
+| /v1/loyalties/members/{memberId}/tiers | get | List Member's Loyalty Tiers | supported | |
+| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | get | List Loyalty Tier Earning Rules | supported | |
+| /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | get | List Loyalty Tier Rewards | supported | |
## Customers
| endpoint | method | summary | is supported | is deprecated |
| --------------------------------------------- | ------ | ------------------------------------- | ------------------------------------ | ------------------------------------ |
diff --git a/README.md b/README.md
index fee138b..32ce703 100644
--- a/README.md
+++ b/README.md
@@ -110,6 +110,12 @@ Remember that this SDK is auto generated (except of the tests) so changes made h
## 📅 Changelog
+- **2024-11-26** - `5.0.2`
+ - Added support for `STANDALONE` campaign type.
+ - Added optional `metadata` in `OrderCalculatedItemSku`
+ - New possible value of `ParameterExpandListCampaigns`
+ - New optional `error` parameter in `Error`
+ - Updated `LoyaltyCardTransactionDetailsBalance`
- **2024-11-04** - `5.0.1`
- Added support for returning `campaign_id` and `campaign_name` in stackable validation endpoint, when `redeemable` option is expanded
- **2024-10-28** - `5.0.0`
@@ -592,6 +598,7 @@ Class | Method | HTTP request | Description
- [EarningRuleSegment](docs/Model/EarningRuleSegment.md)
- [EarningRuleSource](docs/Model/EarningRuleSource.md)
- [Error](docs/Model/Error.md)
+- [ErrorError](docs/Model/ErrorError.md)
- [EventsCreateRequestBody](docs/Model/EventsCreateRequestBody.md)
- [EventsCreateRequestBodyLoyalty](docs/Model/EventsCreateRequestBodyLoyalty.md)
- [EventsCreateRequestBodyReferral](docs/Model/EventsCreateRequestBodyReferral.md)
@@ -871,6 +878,8 @@ Class | Method | HTTP request | Description
- [LoyaltyMemberLoyaltyCard](docs/Model/LoyaltyMemberLoyaltyCard.md)
- [LoyaltyMemberPublish](docs/Model/LoyaltyMemberPublish.md)
- [LoyaltyMemberRedemption](docs/Model/LoyaltyMemberRedemption.md)
+- [LoyaltyPointsBucket](docs/Model/LoyaltyPointsBucket.md)
+- [LoyaltyPointsBucketBucket](docs/Model/LoyaltyPointsBucketBucket.md)
- [LoyaltyTier](docs/Model/LoyaltyTier.md)
- [LoyaltyTierBase](docs/Model/LoyaltyTierBase.md)
- [LoyaltyTierBasePoints](docs/Model/LoyaltyTierBasePoints.md)
@@ -1486,6 +1495,8 @@ Class | Method | HTTP request | Description
- [VoucherAssets](docs/Model/VoucherAssets.md)
- [VoucherAssetsBarcode](docs/Model/VoucherAssetsBarcode.md)
- [VoucherAssetsQr](docs/Model/VoucherAssetsQr.md)
+- [VoucherBalance](docs/Model/VoucherBalance.md)
+- [VoucherBalanceRelatedObject](docs/Model/VoucherBalanceRelatedObject.md)
- [VoucherGift](docs/Model/VoucherGift.md)
- [VoucherLoyaltyCard](docs/Model/VoucherLoyaltyCard.md)
- [VoucherPublish](docs/Model/VoucherPublish.md)
@@ -1621,5 +1632,5 @@ support@voucherify.io
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `v2018-08-01`
- - Package version: `5.0.1`
+ - Package version: `5.0.2`
- Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen`
diff --git a/composer.json b/composer.json
index a5c99f5..b08e4b9 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "rspective/voucherify",
- "version": "5.0.1",
+ "version": "5.0.2",
"description": "Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.",
"keywords": [
"openapitools",
diff --git a/docs/Api/CampaignsApi.md b/docs/Api/CampaignsApi.md
index 4b6cc35..75b44c8 100644
--- a/docs/Api/CampaignsApi.md
+++ b/docs/Api/CampaignsApi.md
@@ -167,7 +167,7 @@ createCampaign($campaignsCreateRequestBody): \OpenAPI\Client\Model\CampaignsCrea
Create Campaign
-Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description.
+Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the type: STANDALONE through the API. Voucherify developers work on adding that feature. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
### Example
@@ -671,7 +671,7 @@ $apiInstance = new OpenAPI\Client\Api\CampaignsApi(
$limit = 56; // int | Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.
$page = 56; // int | Which page of results to return. The lowest value is 1.
$campaignType = new \OpenAPI\Client\Model\ParameterCampaignType(); // ParameterCampaignType | This attribute allows filtering by campaign type.
-$expand = new \OpenAPI\Client\Model\ParameterExpandListCampaigns(); // ParameterExpandListCampaigns | Include an expanded categories object in the response.
+$expand = new \OpenAPI\Client\Model\ParameterExpandListCampaigns(); // ParameterExpandListCampaigns | Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores.
$order = new \OpenAPI\Client\Model\ParameterOrderListCampaigns(); // ParameterOrderListCampaigns | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
$filters = new \OpenAPI\Client\Model\ParameterFiltersListCampaigns(); // ParameterFiltersListCampaigns | Filters the results by campaign status or whether the campaign is a referral campaign.
@@ -690,7 +690,7 @@ try {
| **limit** | **int**| Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. | [optional] |
| **page** | **int**| Which page of results to return. The lowest value is 1. | [optional] |
| **campaignType** | [**ParameterCampaignType**](../Model/.md)| This attribute allows filtering by campaign type. | [optional] |
-| **expand** | [**ParameterExpandListCampaigns**](../Model/.md)| Include an expanded categories object in the response. | [optional] |
+| **expand** | [**ParameterExpandListCampaigns**](../Model/.md)| Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. | [optional] |
| **order** | [**ParameterOrderListCampaigns**](../Model/.md)| Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
| **filters** | [**ParameterFiltersListCampaigns**](../Model/.md)| Filters the results by campaign status or whether the campaign is a referral campaign. | [optional] |
diff --git a/docs/Api/VouchersApi.md b/docs/Api/VouchersApi.md
index 52ef47b..8002dd0 100644
--- a/docs/Api/VouchersApi.md
+++ b/docs/Api/VouchersApi.md
@@ -30,7 +30,7 @@ createVoucher($code, $vouchersCreateWithSpecificCodeRequestBody): \OpenAPI\Clien
Create Voucher
-Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required.
+Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new standalone voucher if no campaign name or campaign_id is provided. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to such campaign. In the case of the loyalty card, a campaign name or ID is required. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for campaign and campaign_id are null. Voucherify developers work on adding an optional feature to create a standalone voucher campaign through the API. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
### Example
@@ -328,7 +328,7 @@ $apiInstance = new OpenAPI\Client\Api\VouchersApi(
$config
);
$code = GIFT-CARD-1; // string | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
-$vouchersTransactionsExportCreateRequestBody = {"parameters":{"order":"-created_at","fields":["id","type","source_id","reason","balance","amount","created_at","voucher_id","campaign_id","details","source"]}}; // \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody | Specify the parameters for the transaction export.
+$vouchersTransactionsExportCreateRequestBody = {"parameters":{"order":"-created_at","fields":["id","type","source_id","reason","balance","amount","created_at","voucher_id","campaign_id","details","source"]}}; // \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody | Specify the parameters for the camapign transaction export.
try {
$result = $apiInstance->exportVoucherTransactions($code, $vouchersTransactionsExportCreateRequestBody);
@@ -343,7 +343,7 @@ try {
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. | |
-| **vouchersTransactionsExportCreateRequestBody** | [**\OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody**](../Model/VouchersTransactionsExportCreateRequestBody.md)| Specify the parameters for the transaction export. | [optional] |
+| **vouchersTransactionsExportCreateRequestBody** | [**\OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody**](../Model/VouchersTransactionsExportCreateRequestBody.md)| Specify the parameters for the camapign transaction export. | [optional] |
### Return type
@@ -370,7 +370,7 @@ generateRandomCode($vouchersCreateRequestBody): \OpenAPI\Client\Model\VouchersCr
Generate Random Code
-Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new stand alone voucher if no campaign name or campaign_id is provided. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists.
+Create a standalone voucher. You can choose to create a GIFT_VOUCHER, a DISCOUNT_VOUCHER, or a LOYALTY_CARD. When you create a new voucher, you can specify a type to create it. Creating a new voucher will create a new standalone voucher if no campaign name or campaign_id is provided. However, if an ID or name of a campaign with the type set to STANDALONE is provided, the voucher will be added to such campaign. In case of the loyalty card, a campaign name is required. You can optionally use the code parameter to define a specific code or the code_config parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API. This method will return an error when trying to create a voucher that already exists. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for campaign and campaign_id are null. Voucherify developers work on adding an optional feature to create a standalone voucher campaign through the API. Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.
### Example
@@ -504,7 +504,7 @@ importVouchers($vouchersImportCreateItemRequestBody): \OpenAPI\Client\Model\Vouc
Import Vouchers
-Import standalone vouchers and gift cards into the repository. 📘 Important notes - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. Any parameters not provided in the payload will be left blank or null. For both **standalone discount vouchers and gift cards**, you can import the following fields: - code - category - active - type - start_date - expiration_date - redemption.quantity - additional_info - metadata For **gift cards**, you can also import the following field: - gift.amount For **discount vouchers**, you can import the discount object. The object will slightly vary depending on the type of discount. Each discount type **requires** the type to be defined in the import. Fields other than the ones listed above wont be imported. Even if provided, they will be silently skipped. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+Import standalone vouchers and gift cards into the repository. 📘 Important notes - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. Any parameters not provided in the payload will be left blank or null. For both **standalone discount vouchers and gift cards**, you can import the following fields: - code - category - active - type - start_date - expiration_date - redemption.quantity - additional_info - metadata For **gift cards**, you can also import the following field: - gift.amount For **discount vouchers**, you can import the discount object. The object will slightly vary depending on the type of discount. Each discount type **requires** the type to be defined in the import. Fields other than the ones listed above wont be imported. Even if provided, they will be silently skipped. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for campaign and campaign_id are null.
### Example
@@ -571,7 +571,7 @@ importVouchersUsingCsv($file): \OpenAPI\Client\Model\VouchersImportCsvCreateResp
Import Vouchers using CSV
-Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request. 🚧 Standalone Vouchers and Campaigns In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), standalone vouchers created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for campaign and campaign_id are null.
### Example
diff --git a/docs/Model/Campaign.md b/docs/Model/Campaign.md
index dd869fd..0ca186c 100644
--- a/docs/Model/Campaign.md
+++ b/docs/Model/Campaign.md
@@ -8,10 +8,10 @@ Name | Type | Description | Notes
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
**campaignType** | **string** | Type of campaign. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers | [optional]
**voucher** | [**\OpenAPI\Client\Model\CampaignVoucher**](CampaignVoucher.md) | | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
**validityTimeframe** | [**\OpenAPI\Client\Model\ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**validityDayOfWeek** | **int[]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
diff --git a/docs/Model/CampaignBase.md b/docs/Model/CampaignBase.md
index 990b2a9..e27be3e 100644
--- a/docs/Model/CampaignBase.md
+++ b/docs/Model/CampaignBase.md
@@ -8,10 +8,10 @@ Name | Type | Description | Notes
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
**campaignType** | **string** | Type of campaign. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers | [optional]
**voucher** | [**\OpenAPI\Client\Model\CampaignVoucher**](CampaignVoucher.md) | | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
**validityTimeframe** | [**\OpenAPI\Client\Model\ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**validityDayOfWeek** | **int[]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
diff --git a/docs/Model/CampaignsCreateRequestBody.md b/docs/Model/CampaignsCreateRequestBody.md
index 964eded..84571fb 100644
--- a/docs/Model/CampaignsCreateRequestBody.md
+++ b/docs/Model/CampaignsCreateRequestBody.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
diff --git a/docs/Model/CampaignsCreateResponseBody.md b/docs/Model/CampaignsCreateResponseBody.md
index 0d8b199..85e21a1 100644
--- a/docs/Model/CampaignsCreateResponseBody.md
+++ b/docs/Model/CampaignsCreateResponseBody.md
@@ -8,10 +8,10 @@ Name | Type | Description | Notes
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
**campaignType** | **string** | Type of campaign. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers | [optional]
**voucher** | [**\OpenAPI\Client\Model\CampaignVoucher**](CampaignVoucher.md) | | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
**validityTimeframe** | [**\OpenAPI\Client\Model\ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**validityDayOfWeek** | **int[]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
diff --git a/docs/Model/CampaignsGetResponseBody.md b/docs/Model/CampaignsGetResponseBody.md
index 86d20a3..d67627d 100644
--- a/docs/Model/CampaignsGetResponseBody.md
+++ b/docs/Model/CampaignsGetResponseBody.md
@@ -8,10 +8,10 @@ Name | Type | Description | Notes
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
**campaignType** | **string** | Type of campaign. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers | [optional]
**voucher** | [**\OpenAPI\Client\Model\CampaignVoucher**](CampaignVoucher.md) | | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
**validityTimeframe** | [**\OpenAPI\Client\Model\ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**validityDayOfWeek** | **int[]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
diff --git a/docs/Model/CampaignsUpdateRequestBody.md b/docs/Model/CampaignsUpdateRequestBody.md
index fdc2766..3e5fb3c 100644
--- a/docs/Model/CampaignsUpdateRequestBody.md
+++ b/docs/Model/CampaignsUpdateRequestBody.md
@@ -15,9 +15,9 @@ Name | Type | Description | Notes
**unsetMetadataFields** | **string[]** | Determine which metadata should be removed from campaign. | [optional]
**categoryId** | **string** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional]
**activityDurationAfterPublishing** | **string** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. If the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`. | [optional]
**discount** | [**\OpenAPI\Client\Model\Discount**](Discount.md) | | [optional]
**referralProgram** | [**\OpenAPI\Client\Model\ReferralProgram**](ReferralProgram.md) | | [optional]
**gift** | [**\OpenAPI\Client\Model\Gift**](Gift.md) | | [optional]
diff --git a/docs/Model/CampaignsUpdateResponseBody.md b/docs/Model/CampaignsUpdateResponseBody.md
index 4d966b9..c7d2025 100644
--- a/docs/Model/CampaignsUpdateResponseBody.md
+++ b/docs/Model/CampaignsUpdateResponseBody.md
@@ -8,10 +8,10 @@ Name | Type | Description | Notes
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
**campaignType** | **string** | Type of campaign. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers | [optional]
**voucher** | [**\OpenAPI\Client\Model\CampaignVoucher**](CampaignVoucher.md) | | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
**validityTimeframe** | [**\OpenAPI\Client\Model\ValidityTimeframe**](ValidityTimeframe.md) | | [optional]
**validityDayOfWeek** | **int[]** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional]
diff --git a/docs/Model/ClientValidationsValidateResponseBodyRedeemablesItem.md b/docs/Model/ClientValidationsValidateResponseBodyRedeemablesItem.md
index f5cf362..7d91fb3 100644
--- a/docs/Model/ClientValidationsValidateResponseBodyRedeemablesItem.md
+++ b/docs/Model/ClientValidationsValidateResponseBodyRedeemablesItem.md
@@ -13,7 +13,8 @@ Name | Type | Description | Notes
**result** | [**\OpenAPI\Client\Model\ClientValidationsValidateResponseBodyRedeemablesItemResult**](ClientValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**\OpenAPI\Client\Model\CategoryWithStackingRulesType[]**](CategoryWithStackingRulesType.md) | | [optional]
-**campaignName** | **string** | Campaign name | [optional]
-**campaignId** | **string** | Unique campaign ID assigned by Voucherify. | [optional]
+**campaignName** | **string** | Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**campaignId** | **string** | Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**name** | **string** | Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/Error.md b/docs/Model/Error.md
index 1a60b84..848b400 100644
--- a/docs/Model/Error.md
+++ b/docs/Model/Error.md
@@ -11,5 +11,6 @@ Name | Type | Description | Notes
**requestId** | **string** | This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team. | [optional]
**resourceId** | **string** | Unique resource ID that can be used in another endpoint to get more details. | [optional]
**resourceType** | **string** | The resource type. | [optional]
+**error** | [**\OpenAPI\Client\Model\ErrorError**](ErrorError.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/ErrorError.md b/docs/Model/ErrorError.md
new file mode 100644
index 0000000..0a1c7b1
--- /dev/null
+++ b/docs/Model/ErrorError.md
@@ -0,0 +1,9 @@
+# # ErrorError
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**message** | **string** | The message configured by the user in a validation rule. | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltiesCreateCampaignRequestBody.md b/docs/Model/LoyaltiesCreateCampaignRequestBody.md
index efc88b3..793c234 100644
--- a/docs/Model/LoyaltiesCreateCampaignRequestBody.md
+++ b/docs/Model/LoyaltiesCreateCampaignRequestBody.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
diff --git a/docs/Model/LoyaltiesMembersBalanceUpdateResponseBody.md b/docs/Model/LoyaltiesMembersBalanceUpdateResponseBody.md
index dba46d5..90a9145 100644
--- a/docs/Model/LoyaltiesMembersBalanceUpdateResponseBody.md
+++ b/docs/Model/LoyaltiesMembersBalanceUpdateResponseBody.md
@@ -10,6 +10,6 @@ Name | Type | Description | Notes
**type** | **string** | The type of voucher being modified. | [optional]
**object** | **string** | The type of the object represented by JSON. Default is balance. | [optional] [default to 'balance']
**relatedObject** | [**\OpenAPI\Client\Model\LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject**](LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md) | | [optional]
-**operationType** | **string** | | [optional]
+**operationType** | **string** | The type of operation being performed. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md b/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md
index db38887..13de901 100644
--- a/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md
+++ b/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md
@@ -4,14 +4,14 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **string** | Unique loyalty points bucket ID. |
-**voucherId** | **string** | Unique parent loyalty card ID. |
-**campaignId** | **string** | Unique parent campaign ID. |
-**bucket** | [**\OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket**](LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md) | |
-**createdAt** | **\DateTime** | Timestamp representing the date and time when the loyalty points bucket object was created. The value is shown in the ISO 8601 format. |
-**status** | **string** | Loyalty points bucket point status. |
-**expiresAt** | **\DateTime** | Date when the number of points defined in the bucket object are due to expire. |
-**updatedAt** | **\DateTime** | Timestamp representing the date and time when the loyalty points bucket object was updated. The value is shown in the ISO 8601 format. | [optional]
-**object** | **string** | The type of the object represented by JSON. This object stores information about the loyalty points bucket. | [default to 'loyalty_points_bucket']
+**id** | **string** | Unique identifier of the loyalty points bucket. | [optional]
+**voucherId** | **string** | Unique identifier of the parent loyalty card. | [optional]
+**campaignId** | **string** | Unique identifier of the parent campaign. | [optional]
+**bucket** | [**\OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket**](LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md) | | [optional]
+**status** | **string** | Loyalty point point bucket status. | [optional]
+**expiresAt** | **\DateTime** | Date when the number of points defined in the bucket object are due to expire. | [optional]
+**createdAt** | **\DateTime** | Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format. | [optional]
+**updatedAt** | **\DateTime** | Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format. | [optional]
+**object** | **string** | The type of the object represented by JSON. This object stores information about the loyalty point bucket. | [optional] [default to 'loyalty_points_bucket']
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md b/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md
index 3f86c55..531fe4e 100644
--- a/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md
+++ b/docs/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md
@@ -4,6 +4,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**totalPoints** | **int** | Total number of points in the loyalty points bucket. |
+**totalPoints** | **int** | Total number of points in the loyalty point bucket. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltiesUpdateCampaignRequestBody.md b/docs/Model/LoyaltiesUpdateCampaignRequestBody.md
index 9243336..aaa416b 100644
--- a/docs/Model/LoyaltiesUpdateCampaignRequestBody.md
+++ b/docs/Model/LoyaltiesUpdateCampaignRequestBody.md
@@ -15,9 +15,9 @@ Name | Type | Description | Notes
**unsetMetadataFields** | **string[]** | Determine which metadata should be removed from campaign. | [optional]
**categoryId** | **string** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional]
**activityDurationAfterPublishing** | **string** | Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days. | [optional]
-**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
+**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them. | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. If the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`. | [optional]
**loyaltyTiersExpiration** | [**\OpenAPI\Client\Model\LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional]
**options** | [**\OpenAPI\Client\Model\LoyaltiesUpdateCampaignRequestBodyOptions**](LoyaltiesUpdateCampaignRequestBodyOptions.md) | | [optional]
diff --git a/docs/Model/LoyaltyCardTransaction.md b/docs/Model/LoyaltyCardTransaction.md
index ad9cf63..a531487 100644
--- a/docs/Model/LoyaltyCardTransaction.md
+++ b/docs/Model/LoyaltyCardTransaction.md
@@ -10,9 +10,9 @@ Name | Type | Description | Notes
**campaignId** | **string** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | [optional]
**source** | **string** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | [optional]
**reason** | **string** | Reason why the transaction occurred. In case of a redemption, this value is null. | [optional]
-**type** | **string** | | [optional]
-**details** | [**\OpenAPI\Client\Model\LoyaltyCardTransactionDetails**](LoyaltyCardTransactionDetails.md) | | [optional]
**relatedTransactionId** | **string** | The related transaction ID on the receiving card. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. | [optional]
+**details** | [**\OpenAPI\Client\Model\LoyaltyCardTransactionDetails**](LoyaltyCardTransactionDetails.md) | | [optional]
+**type** | **string** | Transaction types concerning loyalty points. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltyCardTransactionDetailsBalance.md b/docs/Model/LoyaltyCardTransactionDetailsBalance.md
index 5beef38..fb30773 100644
--- a/docs/Model/LoyaltyCardTransactionDetailsBalance.md
+++ b/docs/Model/LoyaltyCardTransactionDetailsBalance.md
@@ -4,11 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**type** | **string** | The type of voucher whose balance is being adjusted due to the transaction. | [optional] [default to 'loyalty_card']
-**total** | **int** | The number of all points accumulated on the card as affected by add or subtract operations. | [optional]
+**type** | **string** | The type of voucher whose balance is being adjusted due to the transaction. | [optional]
+**total** | **int** | The number of all points or credits accumulated on the card as affected by add or subtract operations. | [optional]
**object** | **string** | The type of the object represented by the JSON. | [optional] [default to 'balance']
-**points** | **int** | Points added or subtracted in the transaction. | [optional]
-**balance** | **int** | The available points on the card after the transaction as affected by redemption or rollback. | [optional]
+**points** | **int** | Points added or subtracted in the transaction of a loyalty card. | [optional]
+**balance** | **int** | The available points or credits on the card after the transaction as affected by redemption or rollback. | [optional]
+**operationType** | **string** | The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption. | [optional]
**relatedObject** | [**\OpenAPI\Client\Model\LoyaltyCardTransactionDetailsBalanceRelatedObject**](LoyaltyCardTransactionDetailsBalanceRelatedObject.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.md b/docs/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.md
index b824401..f0f8838 100644
--- a/docs/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.md
+++ b/docs/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **string** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | [optional]
+**id** | **string** | Identifies the voucher that is being modified. The ID is assigned by the Voucherify API. | [optional]
**type** | **string** | The object being modified, i.e. voucher. | [optional] [default to 'voucher']
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltyPointsBucket.md b/docs/Model/LoyaltyPointsBucket.md
new file mode 100644
index 0000000..38e9268
--- /dev/null
+++ b/docs/Model/LoyaltyPointsBucket.md
@@ -0,0 +1,17 @@
+# # LoyaltyPointsBucket
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **string** | Unique identifier of the loyalty points bucket. | [optional]
+**voucherId** | **string** | Unique identifier of the parent loyalty card. | [optional]
+**campaignId** | **string** | Unique identifier of the parent campaign. | [optional]
+**bucket** | [**\OpenAPI\Client\Model\LoyaltyPointsBucketBucket**](LoyaltyPointsBucketBucket.md) | | [optional]
+**status** | **string** | Loyalty point point bucket status. | [optional]
+**expiresAt** | **\DateTime** | Date when the number of points defined in the bucket object are due to expire. | [optional]
+**createdAt** | **\DateTime** | Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format. | [optional]
+**updatedAt** | **\DateTime** | Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format. | [optional]
+**object** | **string** | The type of the object represented by JSON. This object stores information about the loyalty point bucket. | [optional] [default to 'loyalty_points_bucket']
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/LoyaltyPointsBucketBucket.md b/docs/Model/LoyaltyPointsBucketBucket.md
new file mode 100644
index 0000000..b5869cc
--- /dev/null
+++ b/docs/Model/LoyaltyPointsBucketBucket.md
@@ -0,0 +1,9 @@
+# # LoyaltyPointsBucketBucket
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**totalPoints** | **int** | Total number of points in the loyalty point bucket. | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/Order.md b/docs/Model/Order.md
index be092c9..760f65e 100644
--- a/docs/Model/Order.md
+++ b/docs/Model/Order.md
@@ -11,6 +11,6 @@ Name | Type | Description | Notes
**initialAmount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discountAmount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
**items** | [**\OpenAPI\Client\Model\OrderItem[]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrderCalculated.md b/docs/Model/OrderCalculated.md
index 881b876..dced06d 100644
--- a/docs/Model/OrderCalculated.md
+++ b/docs/Model/OrderCalculated.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/OrderCalculatedItem.md b/docs/Model/OrderCalculatedItem.md
index 6a1f1bc..622fdd7 100644
--- a/docs/Model/OrderCalculatedItem.md
+++ b/docs/Model/OrderCalculatedItem.md
@@ -24,6 +24,6 @@ Name | Type | Description | Notes
**product** | [**\OpenAPI\Client\Model\OrderCalculatedItemProduct**](OrderCalculatedItemProduct.md) | | [optional]
**sku** | [**\OpenAPI\Client\Model\OrderCalculatedItemSku**](OrderCalculatedItemSku.md) | | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order_item']
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrderCalculatedItemProduct.md b/docs/Model/OrderCalculatedItemProduct.md
index 4c77dad..6d300c8 100644
--- a/docs/Model/OrderCalculatedItemProduct.md
+++ b/docs/Model/OrderCalculatedItemProduct.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**sourceId** | **string** | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional]
**override** | **bool** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional]
**name** | **string** | Product name. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**price** | **float** | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrderCalculatedItemSku.md b/docs/Model/OrderCalculatedItemSku.md
index adb6958..4af55e4 100644
--- a/docs/Model/OrderCalculatedItemSku.md
+++ b/docs/Model/OrderCalculatedItemSku.md
@@ -9,5 +9,6 @@ Name | Type | Description | Notes
**override** | **bool** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional]
**sku** | **string** | The SKU name. | [optional]
**price** | **float** | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrderItem.md b/docs/Model/OrderItem.md
index 7075468..0133826 100644
--- a/docs/Model/OrderItem.md
+++ b/docs/Model/OrderItem.md
@@ -17,6 +17,6 @@ Name | Type | Description | Notes
**price** | **int** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional]
**product** | [**\OpenAPI\Client\Model\OrderItemProduct**](OrderItemProduct.md) | | [optional]
**sku** | [**\OpenAPI\Client\Model\OrderItemSku**](OrderItemSku.md) | | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to define business validation rules. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrderItemProduct.md b/docs/Model/OrderItemProduct.md
index d2f6479..76dd1dd 100644
--- a/docs/Model/OrderItemProduct.md
+++ b/docs/Model/OrderItemProduct.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**sourceId** | **string** | The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional]
**override** | **bool** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database. | [optional]
**name** | **string** | Product name. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**price** | **float** | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrderItemSku.md b/docs/Model/OrderItemSku.md
index 00fed55..8753c04 100644
--- a/docs/Model/OrderItemSku.md
+++ b/docs/Model/OrderItemSku.md
@@ -9,5 +9,6 @@ Name | Type | Description | Notes
**override** | **bool** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional]
**sku** | **string** | The SKU name. | [optional]
**price** | **float** | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to create product collections. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/OrdersCreateRequestBody.md b/docs/Model/OrdersCreateRequestBody.md
index e8e597a..507dbe8 100644
--- a/docs/Model/OrdersCreateRequestBody.md
+++ b/docs/Model/OrdersCreateRequestBody.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**initialAmount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discountAmount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
**items** | [**\OpenAPI\Client\Model\OrderItem[]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**referrerId** | **string** | Unique referrer ID. | [optional]
**customer** | [**\OpenAPI\Client\Model\Customer**](Customer.md) | | [optional]
diff --git a/docs/Model/OrdersCreateResponseBody.md b/docs/Model/OrdersCreateResponseBody.md
index 9a55e5f..eba599b 100644
--- a/docs/Model/OrdersCreateResponseBody.md
+++ b/docs/Model/OrdersCreateResponseBody.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/OrdersGetResponseBody.md b/docs/Model/OrdersGetResponseBody.md
index de07bcc..1a36fc8 100644
--- a/docs/Model/OrdersGetResponseBody.md
+++ b/docs/Model/OrdersGetResponseBody.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/OrdersImportCreateRequestBodyItem.md b/docs/Model/OrdersImportCreateRequestBodyItem.md
index 28b8e29..3f5f81f 100644
--- a/docs/Model/OrdersImportCreateRequestBodyItem.md
+++ b/docs/Model/OrdersImportCreateRequestBodyItem.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**initialAmount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discountAmount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
**items** | [**\OpenAPI\Client\Model\OrderItem[]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**referrerId** | **string** | Unique referrer ID. | [optional]
**customer** | [**\OpenAPI\Client\Model\Customer**](Customer.md) | | [optional]
diff --git a/docs/Model/OrdersUpdateRequestBody.md b/docs/Model/OrdersUpdateRequestBody.md
index 5b5c600..55fcfa9 100644
--- a/docs/Model/OrdersUpdateRequestBody.md
+++ b/docs/Model/OrdersUpdateRequestBody.md
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
**initialAmount** | **int** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional]
**discountAmount** | **int** | Sum of all order-level discounts applied to the order. | [optional]
**items** | [**\OpenAPI\Client\Model\OrderItem[]**](OrderItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**referrerId** | **string** | Unique referrer ID. | [optional]
**customer** | [**\OpenAPI\Client\Model\Customer**](Customer.md) | | [optional]
diff --git a/docs/Model/OrdersUpdateResponseBody.md b/docs/Model/OrdersUpdateResponseBody.md
index 1feef26..92c3f70 100644
--- a/docs/Model/OrdersUpdateResponseBody.md
+++ b/docs/Model/OrdersUpdateResponseBody.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/Product.md b/docs/Model/Product.md
index b12613d..c464cee 100644
--- a/docs/Model/Product.md
+++ b/docs/Model/Product.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**name** | **string** | Unique user-defined product name. | [optional]
**price** | **int** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional]
**attributes** | **string[]** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/Model/ProductCollectionsProductsListResponseBodyDataItem.md b/docs/Model/ProductCollectionsProductsListResponseBodyDataItem.md
index c064dd2..dac96d1 100644
--- a/docs/Model/ProductCollectionsProductsListResponseBodyDataItem.md
+++ b/docs/Model/ProductCollectionsProductsListResponseBodyDataItem.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**name** | **string** | Unique user-defined product name. | [optional]
**price** | **int** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional]
**attributes** | **string[]** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. and The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. and The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. | [optional]
**imageUrl** | **string** | | [optional]
**createdAt** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
diff --git a/docs/Model/ProductWithoutSkus.md b/docs/Model/ProductWithoutSkus.md
index e62acaa..48fb24e 100644
--- a/docs/Model/ProductWithoutSkus.md
+++ b/docs/Model/ProductWithoutSkus.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**name** | **string** | Unique user-defined product name. | [optional]
**price** | **int** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional]
**attributes** | **string[]** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/Model/ProductsCreateResponseBody.md b/docs/Model/ProductsCreateResponseBody.md
index 2921453..39d8704 100644
--- a/docs/Model/ProductsCreateResponseBody.md
+++ b/docs/Model/ProductsCreateResponseBody.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**name** | **string** | Unique user-defined product name. | [optional]
**price** | **int** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional]
**attributes** | **string[]** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/Model/ProductsGetResponseBody.md b/docs/Model/ProductsGetResponseBody.md
index fefc53a..2d84e05 100644
--- a/docs/Model/ProductsGetResponseBody.md
+++ b/docs/Model/ProductsGetResponseBody.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**name** | **string** | Unique user-defined product name. | [optional]
**price** | **int** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional]
**attributes** | **string[]** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/Model/ProductsSkusCreateResponseBody.md b/docs/Model/ProductsSkusCreateResponseBody.md
index ddf5dd4..3cd3853 100644
--- a/docs/Model/ProductsSkusCreateResponseBody.md
+++ b/docs/Model/ProductsSkusCreateResponseBody.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**currency** | **string** | SKU price currency. | [optional]
**attributes** | **object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional]
**object** | **string** | The type of the object represented by JSON. This object stores information about the `SKU`. | [optional] [default to 'sku']
diff --git a/docs/Model/ProductsSkusUpdateResponseBody.md b/docs/Model/ProductsSkusUpdateResponseBody.md
index dbd48c8..75db0d9 100644
--- a/docs/Model/ProductsSkusUpdateResponseBody.md
+++ b/docs/Model/ProductsSkusUpdateResponseBody.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**currency** | **string** | SKU price currency. | [optional]
**attributes** | **object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional]
**object** | **string** | The type of the object represented by JSON. This object stores information about the `SKU`. | [optional] [default to 'sku']
diff --git a/docs/Model/ProductsUpdateResponseBody.md b/docs/Model/ProductsUpdateResponseBody.md
index c846978..87b8b2c 100644
--- a/docs/Model/ProductsUpdateResponseBody.md
+++ b/docs/Model/ProductsUpdateResponseBody.md
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**name** | **string** | Unique user-defined product name. | [optional]
**price** | **int** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional]
**attributes** | **string[]** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format. | [optional]
diff --git a/docs/Model/RedemptionEntryOrder.md b/docs/Model/RedemptionEntryOrder.md
index 34c2d85..62769cc 100644
--- a/docs/Model/RedemptionEntryOrder.md
+++ b/docs/Model/RedemptionEntryOrder.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/RedemptionsGetResponseBodyOrder.md b/docs/Model/RedemptionsGetResponseBodyOrder.md
index c5ffdd8..a682a91 100644
--- a/docs/Model/RedemptionsGetResponseBodyOrder.md
+++ b/docs/Model/RedemptionsGetResponseBodyOrder.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/RedemptionsListResponseBodyRedemptionsItemOrder.md b/docs/Model/RedemptionsListResponseBodyRedemptionsItemOrder.md
index 8545397..808f433 100644
--- a/docs/Model/RedemptionsListResponseBodyRedemptionsItemOrder.md
+++ b/docs/Model/RedemptionsListResponseBodyRedemptionsItemOrder.md
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
**itemsAppliedDiscountAmount** | **int** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional]
**totalAppliedDiscountAmount** | **int** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional]
**items** | [**\OpenAPI\Client\Model\OrderCalculatedItem[]**](OrderCalculatedItem.md) | Array of items applied to the order. It can include up 500 items. | [optional]
-**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional]
+**metadata** | **object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas. | [optional]
**object** | **string** | The type of the object represented by JSON. | [optional] [default to 'order']
**createdAt** | **\DateTime** | Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional]
diff --git a/docs/Model/Sku.md b/docs/Model/Sku.md
index a481a7e..7082402 100644
--- a/docs/Model/Sku.md
+++ b/docs/Model/Sku.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**currency** | **string** | SKU price currency. | [optional]
**attributes** | **object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional]
**object** | **string** | The type of the object represented by JSON. This object stores information about the `SKU`. | [optional] [default to 'sku']
diff --git a/docs/Model/SkusGetResponseBody.md b/docs/Model/SkusGetResponseBody.md
index 5630195..a1a3fad 100644
--- a/docs/Model/SkusGetResponseBody.md
+++ b/docs/Model/SkusGetResponseBody.md
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
**currency** | **string** | SKU price currency. | [optional]
**attributes** | **object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional]
**imageUrl** | **string** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional]
-**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional]
+**metadata** | **object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format. | [optional]
**updatedAt** | **\DateTime** | Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format. | [optional]
**object** | **string** | The type of the object represented by JSON. This object stores information about the `SKU`. | [optional] [default to 'sku']
diff --git a/docs/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.md b/docs/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.md
index 89a420d..13a65e6 100644
--- a/docs/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.md
+++ b/docs/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | Campaign name. | [optional]
**description** | **string** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional]
-**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional]
+**type** | **string** | Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | [optional]
**joinOnce** | **bool** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional]
**autoJoin** | **bool** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional]
**useVoucherMetadataSchema** | **bool** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional]
diff --git a/docs/Model/ValidationsRedeemableInapplicable.md b/docs/Model/ValidationsRedeemableInapplicable.md
index 522c8b3..747fde6 100644
--- a/docs/Model/ValidationsRedeemableInapplicable.md
+++ b/docs/Model/ValidationsRedeemableInapplicable.md
@@ -10,7 +10,8 @@ Name | Type | Description | Notes
**result** | [**\OpenAPI\Client\Model\ValidationsRedeemableInapplicableResult**](ValidationsRedeemableInapplicableResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**\OpenAPI\Client\Model\CategoryWithStackingRulesType[]**](CategoryWithStackingRulesType.md) | | [optional]
-**campaignName** | **string** | Campaign name | [optional]
-**campaignId** | **string** | Unique campaign ID assigned by Voucherify. | [optional]
+**campaignName** | **string** | Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**campaignId** | **string** | Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**name** | **string** | Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/ValidationsRedeemableSkipped.md b/docs/Model/ValidationsRedeemableSkipped.md
index b4fdbfb..a1d37bc 100644
--- a/docs/Model/ValidationsRedeemableSkipped.md
+++ b/docs/Model/ValidationsRedeemableSkipped.md
@@ -10,7 +10,8 @@ Name | Type | Description | Notes
**result** | [**\OpenAPI\Client\Model\ValidationsRedeemableSkippedResult**](ValidationsRedeemableSkippedResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**\OpenAPI\Client\Model\CategoryWithStackingRulesType[]**](CategoryWithStackingRulesType.md) | | [optional]
-**campaignName** | **string** | Campaign name | [optional]
-**campaignId** | **string** | Unique campaign ID assigned by Voucherify. | [optional]
+**campaignName** | **string** | Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**campaignId** | **string** | Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**name** | **string** | Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/ValidationsValidateResponseBodyRedeemablesItem.md b/docs/Model/ValidationsValidateResponseBodyRedeemablesItem.md
index 9d77b74..4633d02 100644
--- a/docs/Model/ValidationsValidateResponseBodyRedeemablesItem.md
+++ b/docs/Model/ValidationsValidateResponseBodyRedeemablesItem.md
@@ -13,7 +13,8 @@ Name | Type | Description | Notes
**result** | [**\OpenAPI\Client\Model\ValidationsValidateResponseBodyRedeemablesItemResult**](ValidationsValidateResponseBodyRedeemablesItemResult.md) | | [optional]
**metadata** | **object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional]
**categories** | [**\OpenAPI\Client\Model\CategoryWithStackingRulesType[]**](CategoryWithStackingRulesType.md) | | [optional]
-**campaignName** | **string** | Campaign name | [optional]
-**campaignId** | **string** | Unique campaign ID assigned by Voucherify. | [optional]
+**campaignName** | **string** | Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**campaignId** | **string** | Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
+**name** | **string** | Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/VoucherBalance.md b/docs/Model/VoucherBalance.md
new file mode 100644
index 0000000..13f2ff4
--- /dev/null
+++ b/docs/Model/VoucherBalance.md
@@ -0,0 +1,15 @@
+# # VoucherBalance
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**type** | **string** | The type of voucher whose balance is being adjusted due to the transaction. | [optional]
+**total** | **int** | The number of all points or credits accumulated on the card as affected by add or subtract operations. | [optional]
+**object** | **string** | The type of the object represented by the JSON. | [optional] [default to 'balance']
+**points** | **int** | Points added or subtracted in the transaction of a loyalty card. | [optional]
+**balance** | **int** | The available points or credits on the card after the transaction as affected by redemption or rollback. | [optional]
+**operationType** | **string** | The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption. | [optional]
+**relatedObject** | [**\OpenAPI\Client\Model\VoucherBalanceRelatedObject**](VoucherBalanceRelatedObject.md) | | [optional]
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/VoucherBalanceRelatedObject.md b/docs/Model/VoucherBalanceRelatedObject.md
new file mode 100644
index 0000000..5197052
--- /dev/null
+++ b/docs/Model/VoucherBalanceRelatedObject.md
@@ -0,0 +1,10 @@
+# # VoucherBalanceRelatedObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **string** | Identifies the voucher that is being modified. The ID is assigned by the Voucherify API. | [optional]
+**type** | **string** | The object being modified, i.e. voucher. | [optional] [default to 'voucher']
+
+[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/VoucherTransaction.md b/docs/Model/VoucherTransaction.md
index b5af836..9bcaffb 100644
--- a/docs/Model/VoucherTransaction.md
+++ b/docs/Model/VoucherTransaction.md
@@ -10,9 +10,9 @@ Name | Type | Description | Notes
**campaignId** | **string** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | [optional]
**source** | **string** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | [optional]
**reason** | **string** | Reason why the transaction occurred. In case of a redemption, this value is null. | [optional]
-**type** | **string** | | [optional]
-**details** | [**\OpenAPI\Client\Model\VoucherTransactionDetails**](VoucherTransactionDetails.md) | | [optional]
**relatedTransactionId** | **string** | The related transaction ID on the receiving card. | [optional]
**createdAt** | **\DateTime** | Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format. | [optional]
+**details** | [**\OpenAPI\Client\Model\VoucherTransactionDetails**](VoucherTransactionDetails.md) | | [optional]
+**type** | **mixed** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/VoucherTransactionDetailsBalance.md b/docs/Model/VoucherTransactionDetailsBalance.md
index 369e605..599adeb 100644
--- a/docs/Model/VoucherTransactionDetailsBalance.md
+++ b/docs/Model/VoucherTransactionDetailsBalance.md
@@ -4,11 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**type** | **string** | The type of voucher whose balance is being adjusted due to the transaction. | [optional] [default to 'loyalty_card']
-**total** | **int** | The number of all points accumulated on the card as affected by add or subtract operations. | [optional]
+**type** | **string** | The type of voucher whose balance is being adjusted due to the transaction. | [optional]
+**total** | **int** | The number of all points or credits accumulated on the card as affected by add or subtract operations. | [optional]
**object** | **string** | The type of the object represented by the JSON. | [optional] [default to 'balance']
-**points** | **int** | Points added or subtracted in the transaction. | [optional]
-**balance** | **int** | The available points on the card after the transaction as affected by redemption or rollback. | [optional]
+**points** | **int** | Points added or subtracted in the transaction of a loyalty card. | [optional]
+**balance** | **int** | The available points or credits on the card after the transaction as affected by redemption or rollback. | [optional]
+**operationType** | **string** | The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption. | [optional]
**relatedObject** | [**\OpenAPI\Client\Model\VoucherTransactionDetailsBalanceRelatedObject**](VoucherTransactionDetailsBalanceRelatedObject.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/VoucherTransactionDetailsBalanceRelatedObject.md b/docs/Model/VoucherTransactionDetailsBalanceRelatedObject.md
index d39ab5a..3216cb9 100644
--- a/docs/Model/VoucherTransactionDetailsBalanceRelatedObject.md
+++ b/docs/Model/VoucherTransactionDetailsBalanceRelatedObject.md
@@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**id** | **string** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | [optional]
+**id** | **string** | Identifies the voucher that is being modified. The ID is assigned by the Voucherify API. | [optional]
**type** | **string** | The object being modified, i.e. voucher. | [optional] [default to 'voucher']
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
diff --git a/docs/Model/VouchersBalanceUpdateResponseBody.md b/docs/Model/VouchersBalanceUpdateResponseBody.md
index 2610697..13f73c5 100644
--- a/docs/Model/VouchersBalanceUpdateResponseBody.md
+++ b/docs/Model/VouchersBalanceUpdateResponseBody.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**total** | **int** | Total income incurred over the lifespan of the gift card or loyalty card. | [optional]
**balance** | **int** | The balance after adding or subtracting a specified amount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional]
**type** | **string** | The type of voucher being modified. | [optional]
-**operationType** | **string** | | [optional] [default to 'MANUAL']
+**operationType** | **string** | The type of the operation being performed. | [optional] [default to 'MANUAL']
**object** | **string** | The type of the object represented by JSON. Default is `balance`. | [optional] [default to 'balance']
**relatedObject** | [**\OpenAPI\Client\Model\VouchersBalanceUpdateResponseBodyRelatedObject**](VouchersBalanceUpdateResponseBodyRelatedObject.md) | | [optional]
diff --git a/src/Api/CampaignsApi.php b/src/Api/CampaignsApi.php
index e229f32..fc540ae 100644
--- a/src/Api/CampaignsApi.php
+++ b/src/Api/CampaignsApi.php
@@ -2898,7 +2898,7 @@ public function importVouchersToCampaignUsingCsvRequest($campaignId, $file = nul
* @param int $limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
* @param int $page Which page of results to return. The lowest value is 1. (optional)
* @param ParameterCampaignType $campaignType This attribute allows filtering by campaign type. (optional)
- * @param ParameterExpandListCampaigns $expand Include an expanded categories object in the response. (optional)
+ * @param ParameterExpandListCampaigns $expand Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
* @param ParameterOrderListCampaigns $order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
* @param ParameterFiltersListCampaigns $filters Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCampaigns'] to see the possible values for this operation
@@ -2921,7 +2921,7 @@ public function listCampaigns($limit = null, $page = null, $campaignType = null,
* @param int $limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
* @param int $page Which page of results to return. The lowest value is 1. (optional)
* @param ParameterCampaignType $campaignType This attribute allows filtering by campaign type. (optional)
- * @param ParameterExpandListCampaigns $expand Include an expanded categories object in the response. (optional)
+ * @param ParameterExpandListCampaigns $expand Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
* @param ParameterOrderListCampaigns $order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
* @param ParameterFiltersListCampaigns $filters Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCampaigns'] to see the possible values for this operation
@@ -3026,7 +3026,7 @@ public function listCampaignsWithHttpInfo($limit = null, $page = null, $campaign
* @param int $limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
* @param int $page Which page of results to return. The lowest value is 1. (optional)
* @param ParameterCampaignType $campaignType This attribute allows filtering by campaign type. (optional)
- * @param ParameterExpandListCampaigns $expand Include an expanded categories object in the response. (optional)
+ * @param ParameterExpandListCampaigns $expand Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
* @param ParameterOrderListCampaigns $order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
* @param ParameterFiltersListCampaigns $filters Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCampaigns'] to see the possible values for this operation
@@ -3052,7 +3052,7 @@ function ($response) {
* @param int $limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
* @param int $page Which page of results to return. The lowest value is 1. (optional)
* @param ParameterCampaignType $campaignType This attribute allows filtering by campaign type. (optional)
- * @param ParameterExpandListCampaigns $expand Include an expanded categories object in the response. (optional)
+ * @param ParameterExpandListCampaigns $expand Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
* @param ParameterOrderListCampaigns $order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
* @param ParameterFiltersListCampaigns $filters Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCampaigns'] to see the possible values for this operation
@@ -3107,7 +3107,7 @@ function ($exception) {
* @param int $limit Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items. (optional)
* @param int $page Which page of results to return. The lowest value is 1. (optional)
* @param ParameterCampaignType $campaignType This attribute allows filtering by campaign type. (optional)
- * @param ParameterExpandListCampaigns $expand Include an expanded categories object in the response. (optional)
+ * @param ParameterExpandListCampaigns $expand Includes an expanded categories object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add access_settings_assignments to return assigned areas and stores. (optional)
* @param ParameterOrderListCampaigns $order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. (optional)
* @param ParameterFiltersListCampaigns $filters Filters the results by campaign status or whether the campaign is a referral campaign. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCampaigns'] to see the possible values for this operation
diff --git a/src/Api/VouchersApi.php b/src/Api/VouchersApi.php
index 77406ca..60c2bb8 100644
--- a/src/Api/VouchersApi.php
+++ b/src/Api/VouchersApi.php
@@ -1320,7 +1320,7 @@ public function enableVoucherRequest($code, string $contentType = self::contentT
* Export Voucher Transactions
*
* @param string $code A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. (required)
- * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the transaction export. (optional)
+ * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the camapign transaction export. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportVoucherTransactions'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
@@ -1339,7 +1339,7 @@ public function exportVoucherTransactions($code, $vouchersTransactionsExportCrea
* Export Voucher Transactions
*
* @param string $code A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. (required)
- * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the transaction export. (optional)
+ * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the camapign transaction export. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportVoucherTransactions'] to see the possible values for this operation
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
@@ -1440,7 +1440,7 @@ public function exportVoucherTransactionsWithHttpInfo($code, $vouchersTransactio
* Export Voucher Transactions
*
* @param string $code A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. (required)
- * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the transaction export. (optional)
+ * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the camapign transaction export. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportVoucherTransactions'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
@@ -1462,7 +1462,7 @@ function ($response) {
* Export Voucher Transactions
*
* @param string $code A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. (required)
- * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the transaction export. (optional)
+ * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the camapign transaction export. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportVoucherTransactions'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
@@ -1513,7 +1513,7 @@ function ($exception) {
* Create request for operation 'exportVoucherTransactions'
*
* @param string $code A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. (required)
- * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the transaction export. (optional)
+ * @param \OpenAPI\Client\Model\VouchersTransactionsExportCreateRequestBody $vouchersTransactionsExportCreateRequestBody Specify the parameters for the camapign transaction export. (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['exportVoucherTransactions'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
diff --git a/src/Configuration.php b/src/Configuration.php
index bc8f6bc..e3debb4 100644
--- a/src/Configuration.php
+++ b/src/Configuration.php
@@ -100,7 +100,7 @@ class Configuration
*
* @var string
*/
- protected $userAgent = 'OpenAPI-Generator/5.0.1/PHP';
+ protected $userAgent = 'OpenAPI-Generator/5.0.2/PHP';
/**
* Debug switch (default set to false)
@@ -433,7 +433,7 @@ public static function toDebugReport()
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: v2018-08-01' . PHP_EOL;
- $report .= ' SDK Package Version: 5.0.1' . PHP_EOL;
+ $report .= ' SDK Package Version: 5.0.2' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
return $report;
diff --git a/src/Model/AccessSettingsCampaignAssignmentsList.php b/src/Model/AccessSettingsCampaignAssignmentsList.php
index 4d217f0..d98ed55 100644
--- a/src/Model/AccessSettingsCampaignAssignmentsList.php
+++ b/src/Model/AccessSettingsCampaignAssignmentsList.php
@@ -36,7 +36,7 @@
* AccessSettingsCampaignAssignmentsList Class Doc Comment
*
* @category Class
- * @description Lists all assignments of the campaign to areas and stores. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
+ * @description Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](ref:list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. **NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
diff --git a/src/Model/Campaign.php b/src/Model/Campaign.php
index 153c363..80f9783 100644
--- a/src/Model/Campaign.php
+++ b/src/Model/Campaign.php
@@ -428,6 +428,7 @@ public function getModelName()
public const CAMPAIGN_TYPE_REFERRAL_PROGRAM = 'REFERRAL_PROGRAM';
public const TYPE_AUTO_UPDATE = 'AUTO_UPDATE';
public const TYPE__STATIC = 'STATIC';
+ public const TYPE_STANDALONE = 'STANDALONE';
public const VALIDITY_DAY_OF_WEEK_0 = 0;
public const VALIDITY_DAY_OF_WEEK_1 = 1;
public const VALIDITY_DAY_OF_WEEK_2 = 2;
@@ -472,6 +473,7 @@ public function getTypeAllowableValues()
return [
self::TYPE_AUTO_UPDATE,
self::TYPE__STATIC,
+ self::TYPE_STANDALONE,
];
}
@@ -812,7 +814,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
*
* @return self
*/
@@ -917,7 +919,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
diff --git a/src/Model/CampaignBase.php b/src/Model/CampaignBase.php
index df920c4..1035de1 100644
--- a/src/Model/CampaignBase.php
+++ b/src/Model/CampaignBase.php
@@ -411,6 +411,7 @@ public function getModelName()
public const CAMPAIGN_TYPE_REFERRAL_PROGRAM = 'REFERRAL_PROGRAM';
public const TYPE_AUTO_UPDATE = 'AUTO_UPDATE';
public const TYPE__STATIC = 'STATIC';
+ public const TYPE_STANDALONE = 'STANDALONE';
public const VALIDITY_DAY_OF_WEEK_0 = 0;
public const VALIDITY_DAY_OF_WEEK_1 = 1;
public const VALIDITY_DAY_OF_WEEK_2 = 2;
@@ -455,6 +456,7 @@ public function getTypeAllowableValues()
return [
self::TYPE_AUTO_UPDATE,
self::TYPE__STATIC,
+ self::TYPE_STANDALONE,
];
}
@@ -792,7 +794,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
*
* @return self
*/
@@ -897,7 +899,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
diff --git a/src/Model/CampaignsCreateRequestBody.php b/src/Model/CampaignsCreateRequestBody.php
index 383e18b..ade13d0 100644
--- a/src/Model/CampaignsCreateRequestBody.php
+++ b/src/Model/CampaignsCreateRequestBody.php
@@ -594,7 +594,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
*
* @return self
*/
diff --git a/src/Model/CampaignsCreateResponseBody.php b/src/Model/CampaignsCreateResponseBody.php
index a38107d..5aac184 100644
--- a/src/Model/CampaignsCreateResponseBody.php
+++ b/src/Model/CampaignsCreateResponseBody.php
@@ -429,6 +429,7 @@ public function getModelName()
public const CAMPAIGN_TYPE_REFERRAL_PROGRAM = 'REFERRAL_PROGRAM';
public const TYPE_AUTO_UPDATE = 'AUTO_UPDATE';
public const TYPE__STATIC = 'STATIC';
+ public const TYPE_STANDALONE = 'STANDALONE';
public const VALIDITY_DAY_OF_WEEK_0 = 0;
public const VALIDITY_DAY_OF_WEEK_1 = 1;
public const VALIDITY_DAY_OF_WEEK_2 = 2;
@@ -473,6 +474,7 @@ public function getTypeAllowableValues()
return [
self::TYPE_AUTO_UPDATE,
self::TYPE__STATIC,
+ self::TYPE_STANDALONE,
];
}
@@ -813,7 +815,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
*
* @return self
*/
@@ -918,7 +920,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
diff --git a/src/Model/CampaignsGetResponseBody.php b/src/Model/CampaignsGetResponseBody.php
index 720abfc..aee7327 100644
--- a/src/Model/CampaignsGetResponseBody.php
+++ b/src/Model/CampaignsGetResponseBody.php
@@ -429,6 +429,7 @@ public function getModelName()
public const CAMPAIGN_TYPE_REFERRAL_PROGRAM = 'REFERRAL_PROGRAM';
public const TYPE_AUTO_UPDATE = 'AUTO_UPDATE';
public const TYPE__STATIC = 'STATIC';
+ public const TYPE_STANDALONE = 'STANDALONE';
public const VALIDITY_DAY_OF_WEEK_0 = 0;
public const VALIDITY_DAY_OF_WEEK_1 = 1;
public const VALIDITY_DAY_OF_WEEK_2 = 2;
@@ -473,6 +474,7 @@ public function getTypeAllowableValues()
return [
self::TYPE_AUTO_UPDATE,
self::TYPE__STATIC,
+ self::TYPE_STANDALONE,
];
}
@@ -813,7 +815,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
*
* @return self
*/
@@ -918,7 +920,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
diff --git a/src/Model/CampaignsUpdateRequestBody.php b/src/Model/CampaignsUpdateRequestBody.php
index f2a1aac..ee11bcc 100644
--- a/src/Model/CampaignsUpdateRequestBody.php
+++ b/src/Model/CampaignsUpdateRequestBody.php
@@ -847,7 +847,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
@@ -915,7 +915,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. If the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`.
*
* @return self
*/
diff --git a/src/Model/CampaignsUpdateResponseBody.php b/src/Model/CampaignsUpdateResponseBody.php
index 2d76e26..9a066ae 100644
--- a/src/Model/CampaignsUpdateResponseBody.php
+++ b/src/Model/CampaignsUpdateResponseBody.php
@@ -429,6 +429,7 @@ public function getModelName()
public const CAMPAIGN_TYPE_REFERRAL_PROGRAM = 'REFERRAL_PROGRAM';
public const TYPE_AUTO_UPDATE = 'AUTO_UPDATE';
public const TYPE__STATIC = 'STATIC';
+ public const TYPE_STANDALONE = 'STANDALONE';
public const VALIDITY_DAY_OF_WEEK_0 = 0;
public const VALIDITY_DAY_OF_WEEK_1 = 1;
public const VALIDITY_DAY_OF_WEEK_2 = 2;
@@ -473,6 +474,7 @@ public function getTypeAllowableValues()
return [
self::TYPE_AUTO_UPDATE,
self::TYPE__STATIC,
+ self::TYPE_STANDALONE,
];
}
@@ -813,7 +815,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published - `STANDALONE`: campaign for single vouchers
*
* @return self
*/
@@ -918,7 +920,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
diff --git a/src/Model/ClientValidationsValidateResponseBodyRedeemablesItem.php b/src/Model/ClientValidationsValidateResponseBodyRedeemablesItem.php
index 7c29cf1..ee2f413 100644
--- a/src/Model/ClientValidationsValidateResponseBodyRedeemablesItem.php
+++ b/src/Model/ClientValidationsValidateResponseBodyRedeemablesItem.php
@@ -68,7 +68,8 @@ class ClientValidationsValidateResponseBodyRedeemablesItem implements ModelInter
'metadata' => 'object',
'categories' => '\OpenAPI\Client\Model\CategoryWithStackingRulesType[]',
'campaignName' => 'string',
- 'campaignId' => 'string'
+ 'campaignId' => 'string',
+ 'name' => 'string'
];
/**
@@ -89,7 +90,8 @@ class ClientValidationsValidateResponseBodyRedeemablesItem implements ModelInter
'metadata' => null,
'categories' => null,
'campaignName' => null,
- 'campaignId' => null
+ 'campaignId' => null,
+ 'name' => null
];
/**
@@ -108,7 +110,8 @@ class ClientValidationsValidateResponseBodyRedeemablesItem implements ModelInter
'metadata' => true,
'categories' => true,
'campaignName' => true,
- 'campaignId' => true
+ 'campaignId' => true,
+ 'name' => true
];
/**
@@ -207,7 +210,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'metadata',
'categories' => 'categories',
'campaignName' => 'campaign_name',
- 'campaignId' => 'campaign_id'
+ 'campaignId' => 'campaign_id',
+ 'name' => 'name'
];
/**
@@ -226,7 +230,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'setMetadata',
'categories' => 'setCategories',
'campaignName' => 'setCampaignName',
- 'campaignId' => 'setCampaignId'
+ 'campaignId' => 'setCampaignId',
+ 'name' => 'setName'
];
/**
@@ -245,7 +250,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'getMetadata',
'categories' => 'getCategories',
'campaignName' => 'getCampaignName',
- 'campaignId' => 'getCampaignId'
+ 'campaignId' => 'getCampaignId',
+ 'name' => 'getName'
];
/**
@@ -348,6 +354,7 @@ public function __construct(array $data = null)
$this->setIfExists('categories', $data ?? [], null);
$this->setIfExists('campaignName', $data ?? [], null);
$this->setIfExists('campaignId', $data ?? [], null);
+ $this->setIfExists('name', $data ?? [], null);
}
/**
@@ -714,7 +721,7 @@ public function getCampaignName()
/**
* Sets campaignName
*
- * @param string|null $campaignName Campaign name
+ * @param string|null $campaignName Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -748,7 +755,7 @@ public function getCampaignId()
/**
* Sets campaignId
*
- * @param string|null $campaignId Unique campaign ID assigned by Voucherify.
+ * @param string|null $campaignId Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -768,6 +775,40 @@ public function setCampaignId($campaignId)
return $this;
}
+
+ /**
+ * Gets name
+ *
+ * @return string|null
+ */
+ public function getName()
+ {
+ return $this->container['name'];
+ }
+
+ /**
+ * Sets name
+ *
+ * @param string|null $name Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
+ *
+ * @return self
+ */
+ public function setName($name)
+ {
+ if (is_null($name)) {
+ array_push($this->openAPINullablesSetToNull, 'name');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('name', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['name'] = $name;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/Error.php b/src/Model/Error.php
index 4a30354..e496c63 100644
--- a/src/Model/Error.php
+++ b/src/Model/Error.php
@@ -65,7 +65,8 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable
'details' => 'string',
'requestId' => 'string',
'resourceId' => 'string',
- 'resourceType' => 'string'
+ 'resourceType' => 'string',
+ 'error' => '\OpenAPI\Client\Model\ErrorError'
];
/**
@@ -82,7 +83,8 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable
'details' => null,
'requestId' => null,
'resourceId' => null,
- 'resourceType' => null
+ 'resourceType' => null,
+ 'error' => null
];
/**
@@ -97,7 +99,8 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable
'details' => true,
'requestId' => true,
'resourceId' => true,
- 'resourceType' => true
+ 'resourceType' => true,
+ 'error' => true
];
/**
@@ -192,7 +195,8 @@ public function isNullableSetToNull(string $property): bool
'details' => 'details',
'requestId' => 'request_id',
'resourceId' => 'resource_id',
- 'resourceType' => 'resource_type'
+ 'resourceType' => 'resource_type',
+ 'error' => 'error'
];
/**
@@ -207,7 +211,8 @@ public function isNullableSetToNull(string $property): bool
'details' => 'setDetails',
'requestId' => 'setRequestId',
'resourceId' => 'setResourceId',
- 'resourceType' => 'setResourceType'
+ 'resourceType' => 'setResourceType',
+ 'error' => 'setError'
];
/**
@@ -222,7 +227,8 @@ public function isNullableSetToNull(string $property): bool
'details' => 'getDetails',
'requestId' => 'getRequestId',
'resourceId' => 'getResourceId',
- 'resourceType' => 'getResourceType'
+ 'resourceType' => 'getResourceType',
+ 'error' => 'getError'
];
/**
@@ -289,6 +295,7 @@ public function __construct(array $data = null)
$this->setIfExists('requestId', $data ?? [], null);
$this->setIfExists('resourceId', $data ?? [], null);
$this->setIfExists('resourceType', $data ?? [], null);
+ $this->setIfExists('error', $data ?? [], null);
}
/**
@@ -570,6 +577,40 @@ public function setResourceType($resourceType)
return $this;
}
+
+ /**
+ * Gets error
+ *
+ * @return \OpenAPI\Client\Model\ErrorError|null
+ */
+ public function getError()
+ {
+ return $this->container['error'];
+ }
+
+ /**
+ * Sets error
+ *
+ * @param \OpenAPI\Client\Model\ErrorError|null $error error
+ *
+ * @return self
+ */
+ public function setError($error)
+ {
+ if (is_null($error)) {
+ array_push($this->openAPINullablesSetToNull, 'error');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('error', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['error'] = $error;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/ErrorError.php b/src/Model/ErrorError.php
new file mode 100644
index 0000000..a677a84
--- /dev/null
+++ b/src/Model/ErrorError.php
@@ -0,0 +1,418 @@
+
+ */
+class ErrorError implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'ErrorError';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'message' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'message' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'message' => true
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * 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 nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'message' => 'message'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'message' => 'setMessage'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'message' => 'getMessage'
+ ];
+
+ /**
+ * 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->setIfExists('message', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * 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 message
+ *
+ * @return string|null
+ */
+ public function getMessage()
+ {
+ return $this->container['message'];
+ }
+
+ /**
+ * Sets message
+ *
+ * @param string|null $message The message configured by the user in a validation rule.
+ *
+ * @return self
+ */
+ public function setMessage($message)
+ {
+ if (is_null($message)) {
+ array_push($this->openAPINullablesSetToNull, 'message');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('message', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['message'] = $message;
+
+ 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/src/Model/LoyaltiesCreateCampaignRequestBody.php b/src/Model/LoyaltiesCreateCampaignRequestBody.php
index 6b47163..ce6437b 100644
--- a/src/Model/LoyaltiesCreateCampaignRequestBody.php
+++ b/src/Model/LoyaltiesCreateCampaignRequestBody.php
@@ -573,7 +573,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
*
* @return self
*/
diff --git a/src/Model/LoyaltiesMembersBalanceUpdateResponseBody.php b/src/Model/LoyaltiesMembersBalanceUpdateResponseBody.php
index a3e8e09..ee7a333 100644
--- a/src/Model/LoyaltiesMembersBalanceUpdateResponseBody.php
+++ b/src/Model/LoyaltiesMembersBalanceUpdateResponseBody.php
@@ -658,7 +658,7 @@ public function getOperationType()
/**
* Sets operationType
*
- * @param string|null $operationType operationType
+ * @param string|null $operationType The type of operation being performed.
*
* @return self
*/
diff --git a/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.php b/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.php
index b783ed0..92f6686 100644
--- a/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.php
+++ b/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.php
@@ -36,6 +36,7 @@
* LoyaltiesMembersPointsExpirationListResponseBodyDataItem Class Doc Comment
*
* @category Class
+ * @description Contains the details about expiring loyalty points.
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
@@ -62,9 +63,9 @@ class LoyaltiesMembersPointsExpirationListResponseBodyDataItem implements ModelI
'voucherId' => 'string',
'campaignId' => 'string',
'bucket' => '\OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket',
- 'createdAt' => '\DateTime',
'status' => 'string',
'expiresAt' => '\DateTime',
+ 'createdAt' => '\DateTime',
'updatedAt' => '\DateTime',
'object' => 'string'
];
@@ -81,9 +82,9 @@ class LoyaltiesMembersPointsExpirationListResponseBodyDataItem implements ModelI
'voucherId' => null,
'campaignId' => null,
'bucket' => null,
- 'createdAt' => 'date-time',
'status' => null,
'expiresAt' => 'date-time',
+ 'createdAt' => 'date-time',
'updatedAt' => 'date-time',
'object' => null
];
@@ -94,15 +95,15 @@ class LoyaltiesMembersPointsExpirationListResponseBodyDataItem implements ModelI
* @var boolean[]
*/
protected static array $openAPINullables = [
- 'id' => false,
- 'voucherId' => false,
- 'campaignId' => false,
- 'bucket' => false,
- 'createdAt' => false,
- 'status' => false,
- 'expiresAt' => false,
- 'updatedAt' => false,
- 'object' => false
+ 'id' => true,
+ 'voucherId' => true,
+ 'campaignId' => true,
+ 'bucket' => true,
+ 'status' => true,
+ 'expiresAt' => true,
+ 'createdAt' => true,
+ 'updatedAt' => true,
+ 'object' => true
];
/**
@@ -195,9 +196,9 @@ public function isNullableSetToNull(string $property): bool
'voucherId' => 'voucher_id',
'campaignId' => 'campaign_id',
'bucket' => 'bucket',
- 'createdAt' => 'created_at',
'status' => 'status',
'expiresAt' => 'expires_at',
+ 'createdAt' => 'created_at',
'updatedAt' => 'updated_at',
'object' => 'object'
];
@@ -212,9 +213,9 @@ public function isNullableSetToNull(string $property): bool
'voucherId' => 'setVoucherId',
'campaignId' => 'setCampaignId',
'bucket' => 'setBucket',
- 'createdAt' => 'setCreatedAt',
'status' => 'setStatus',
'expiresAt' => 'setExpiresAt',
+ 'createdAt' => 'setCreatedAt',
'updatedAt' => 'setUpdatedAt',
'object' => 'setObject'
];
@@ -229,9 +230,9 @@ public function isNullableSetToNull(string $property): bool
'voucherId' => 'getVoucherId',
'campaignId' => 'getCampaignId',
'bucket' => 'getBucket',
- 'createdAt' => 'getCreatedAt',
'status' => 'getStatus',
'expiresAt' => 'getExpiresAt',
+ 'createdAt' => 'getCreatedAt',
'updatedAt' => 'getUpdatedAt',
'object' => 'getObject'
];
@@ -310,9 +311,9 @@ public function __construct(array $data = null)
$this->setIfExists('voucherId', $data ?? [], null);
$this->setIfExists('campaignId', $data ?? [], null);
$this->setIfExists('bucket', $data ?? [], null);
- $this->setIfExists('createdAt', $data ?? [], null);
$this->setIfExists('status', $data ?? [], null);
$this->setIfExists('expiresAt', $data ?? [], null);
+ $this->setIfExists('createdAt', $data ?? [], null);
$this->setIfExists('updatedAt', $data ?? [], null);
$this->setIfExists('object', $data ?? [], 'loyalty_points_bucket');
}
@@ -344,30 +345,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];
- if ($this->container['id'] === null) {
- $invalidProperties[] = "'id' can't be null";
- }
- if ($this->container['voucherId'] === null) {
- $invalidProperties[] = "'voucherId' can't be null";
- }
- if ($this->container['campaignId'] === null) {
- $invalidProperties[] = "'campaignId' can't be null";
- }
- if ($this->container['bucket'] === null) {
- $invalidProperties[] = "'bucket' can't be null";
- }
- if ($this->container['createdAt'] === null) {
- $invalidProperties[] = "'createdAt' can't be null";
- }
- if ($this->container['status'] === null) {
- $invalidProperties[] = "'status' can't be null";
- }
- if ($this->container['expiresAt'] === null) {
- $invalidProperties[] = "'expiresAt' can't be null";
- }
- if ($this->container['object'] === null) {
- $invalidProperties[] = "'object' can't be null";
- }
$allowedValues = $this->getObjectAllowableValues();
if (!is_null($this->container['object']) && !in_array($this->container['object'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
@@ -377,10 +354,6 @@ public function listInvalidProperties()
);
}
- if (!preg_match("/loyalty_points_bucket/", $this->container['object'])) {
- $invalidProperties[] = "invalid value for 'object', must be conform to the pattern /loyalty_points_bucket/.";
- }
-
return $invalidProperties;
}
@@ -399,7 +372,7 @@ public function valid()
/**
* Gets id
*
- * @return string
+ * @return string|null
*/
public function getId()
{
@@ -409,14 +382,21 @@ public function getId()
/**
* Sets id
*
- * @param string $id Unique loyalty points bucket ID.
+ * @param string|null $id Unique identifier of the loyalty points bucket.
*
* @return self
*/
public function setId($id)
{
if (is_null($id)) {
- throw new \InvalidArgumentException('non-nullable id cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'id');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('id', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['id'] = $id;
@@ -426,7 +406,7 @@ public function setId($id)
/**
* Gets voucherId
*
- * @return string
+ * @return string|null
*/
public function getVoucherId()
{
@@ -436,14 +416,21 @@ public function getVoucherId()
/**
* Sets voucherId
*
- * @param string $voucherId Unique parent loyalty card ID.
+ * @param string|null $voucherId Unique identifier of the parent loyalty card.
*
* @return self
*/
public function setVoucherId($voucherId)
{
if (is_null($voucherId)) {
- throw new \InvalidArgumentException('non-nullable voucherId cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'voucherId');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('voucherId', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['voucherId'] = $voucherId;
@@ -453,7 +440,7 @@ public function setVoucherId($voucherId)
/**
* Gets campaignId
*
- * @return string
+ * @return string|null
*/
public function getCampaignId()
{
@@ -463,14 +450,21 @@ public function getCampaignId()
/**
* Sets campaignId
*
- * @param string $campaignId Unique parent campaign ID.
+ * @param string|null $campaignId Unique identifier of the parent campaign.
*
* @return self
*/
public function setCampaignId($campaignId)
{
if (is_null($campaignId)) {
- throw new \InvalidArgumentException('non-nullable campaignId cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'campaignId');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('campaignId', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['campaignId'] = $campaignId;
@@ -480,7 +474,7 @@ public function setCampaignId($campaignId)
/**
* Gets bucket
*
- * @return \OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket
+ * @return \OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket|null
*/
public function getBucket()
{
@@ -490,14 +484,21 @@ public function getBucket()
/**
* Sets bucket
*
- * @param \OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket $bucket bucket
+ * @param \OpenAPI\Client\Model\LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket|null $bucket bucket
*
* @return self
*/
public function setBucket($bucket)
{
if (is_null($bucket)) {
- throw new \InvalidArgumentException('non-nullable bucket cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'bucket');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('bucket', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['bucket'] = $bucket;
@@ -505,82 +506,103 @@ public function setBucket($bucket)
}
/**
- * Gets createdAt
+ * Gets status
*
- * @return \DateTime
+ * @return string|null
*/
- public function getCreatedAt()
+ public function getStatus()
{
- return $this->container['createdAt'];
+ return $this->container['status'];
}
/**
- * Sets createdAt
+ * Sets status
*
- * @param \DateTime $createdAt Timestamp representing the date and time when the loyalty points bucket object was created. The value is shown in the ISO 8601 format.
+ * @param string|null $status Loyalty point point bucket status.
*
* @return self
*/
- public function setCreatedAt($createdAt)
+ public function setStatus($status)
{
- if (is_null($createdAt)) {
- throw new \InvalidArgumentException('non-nullable createdAt cannot be null');
+ if (is_null($status)) {
+ array_push($this->openAPINullablesSetToNull, 'status');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('status', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
- $this->container['createdAt'] = $createdAt;
+ $this->container['status'] = $status;
return $this;
}
/**
- * Gets status
+ * Gets expiresAt
*
- * @return string
+ * @return \DateTime|null
*/
- public function getStatus()
+ public function getExpiresAt()
{
- return $this->container['status'];
+ return $this->container['expiresAt'];
}
/**
- * Sets status
+ * Sets expiresAt
*
- * @param string $status Loyalty points bucket point status.
+ * @param \DateTime|null $expiresAt Date when the number of points defined in the bucket object are due to expire.
*
* @return self
*/
- public function setStatus($status)
+ public function setExpiresAt($expiresAt)
{
- if (is_null($status)) {
- throw new \InvalidArgumentException('non-nullable status cannot be null');
+ if (is_null($expiresAt)) {
+ array_push($this->openAPINullablesSetToNull, 'expiresAt');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('expiresAt', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
- $this->container['status'] = $status;
+ $this->container['expiresAt'] = $expiresAt;
return $this;
}
/**
- * Gets expiresAt
+ * Gets createdAt
*
- * @return \DateTime
+ * @return \DateTime|null
*/
- public function getExpiresAt()
+ public function getCreatedAt()
{
- return $this->container['expiresAt'];
+ return $this->container['createdAt'];
}
/**
- * Sets expiresAt
+ * Sets createdAt
*
- * @param \DateTime $expiresAt Date when the number of points defined in the bucket object are due to expire.
+ * @param \DateTime|null $createdAt Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format.
*
* @return self
*/
- public function setExpiresAt($expiresAt)
+ public function setCreatedAt($createdAt)
{
- if (is_null($expiresAt)) {
- throw new \InvalidArgumentException('non-nullable expiresAt cannot be null');
+ if (is_null($createdAt)) {
+ array_push($this->openAPINullablesSetToNull, 'createdAt');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('createdAt', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
- $this->container['expiresAt'] = $expiresAt;
+ $this->container['createdAt'] = $createdAt;
return $this;
}
@@ -598,14 +620,21 @@ public function getUpdatedAt()
/**
* Sets updatedAt
*
- * @param \DateTime|null $updatedAt Timestamp representing the date and time when the loyalty points bucket object was updated. The value is shown in the ISO 8601 format.
+ * @param \DateTime|null $updatedAt Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format.
*
* @return self
*/
public function setUpdatedAt($updatedAt)
{
if (is_null($updatedAt)) {
- throw new \InvalidArgumentException('non-nullable updatedAt cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'updatedAt');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('updatedAt', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['updatedAt'] = $updatedAt;
@@ -615,7 +644,7 @@ public function setUpdatedAt($updatedAt)
/**
* Gets object
*
- * @return string
+ * @return string|null
*/
public function getObject()
{
@@ -625,17 +654,24 @@ public function getObject()
/**
* Sets object
*
- * @param string $object The type of the object represented by JSON. This object stores information about the loyalty points bucket.
+ * @param string|null $object The type of the object represented by JSON. This object stores information about the loyalty point bucket.
*
* @return self
*/
public function setObject($object)
{
if (is_null($object)) {
- throw new \InvalidArgumentException('non-nullable object cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'object');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('object', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$allowedValues = $this->getObjectAllowableValues();
- if (!in_array($object, $allowedValues, true)) {
+ if (!is_null($object) && !in_array($object, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value '%s' for 'object', must be one of '%s'",
@@ -644,11 +680,6 @@ public function setObject($object)
)
);
}
-
- if ((!preg_match("/loyalty_points_bucket/", $object))) {
- throw new \InvalidArgumentException("invalid value for \$object when calling LoyaltiesMembersPointsExpirationListResponseBodyDataItem., must conform to the pattern /loyalty_points_bucket/.");
- }
-
$this->container['object'] = $object;
return $this;
diff --git a/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.php b/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.php
index eb27941..1c55bd8 100644
--- a/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.php
+++ b/src/Model/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.php
@@ -36,7 +36,7 @@
* LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket Class Doc Comment
*
* @category Class
- * @description Defines the number of points stored in the given loyalty points bucket.
+ * @description Defines the number of points stored in this loyalty point bucket.
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
@@ -79,7 +79,7 @@ class LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket implements
* @var boolean[]
*/
protected static array $openAPINullables = [
- 'totalPoints' => false
+ 'totalPoints' => true
];
/**
@@ -276,9 +276,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];
- if ($this->container['totalPoints'] === null) {
- $invalidProperties[] = "'totalPoints' can't be null";
- }
return $invalidProperties;
}
@@ -297,7 +294,7 @@ public function valid()
/**
* Gets totalPoints
*
- * @return int
+ * @return int|null
*/
public function getTotalPoints()
{
@@ -307,14 +304,21 @@ public function getTotalPoints()
/**
* Sets totalPoints
*
- * @param int $totalPoints Total number of points in the loyalty points bucket.
+ * @param int|null $totalPoints Total number of points in the loyalty point bucket.
*
* @return self
*/
public function setTotalPoints($totalPoints)
{
if (is_null($totalPoints)) {
- throw new \InvalidArgumentException('non-nullable totalPoints cannot be null');
+ array_push($this->openAPINullablesSetToNull, 'totalPoints');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('totalPoints', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
}
$this->container['totalPoints'] = $totalPoints;
diff --git a/src/Model/LoyaltiesUpdateCampaignRequestBody.php b/src/Model/LoyaltiesUpdateCampaignRequestBody.php
index 2cf3f50..3fb209d 100644
--- a/src/Model/LoyaltiesUpdateCampaignRequestBody.php
+++ b/src/Model/LoyaltiesUpdateCampaignRequestBody.php
@@ -827,7 +827,7 @@ public function getJoinOnce()
/**
* Sets joinOnce
*
- * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once.
+ * @param bool|null $joinOnce If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for standalone voucher campaigns and it cannot be changed in them.
*
* @return self
*/
@@ -895,7 +895,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. If the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`.
*
* @return self
*/
diff --git a/src/Model/LoyaltyCardTransaction.php b/src/Model/LoyaltyCardTransaction.php
index bf1eeaf..92ce2c1 100644
--- a/src/Model/LoyaltyCardTransaction.php
+++ b/src/Model/LoyaltyCardTransaction.php
@@ -64,10 +64,10 @@ class LoyaltyCardTransaction implements ModelInterface, ArrayAccess, \JsonSerial
'campaignId' => 'string',
'source' => 'string',
'reason' => 'string',
- 'type' => 'string',
- 'details' => '\OpenAPI\Client\Model\LoyaltyCardTransactionDetails',
'relatedTransactionId' => 'string',
- 'createdAt' => '\DateTime'
+ 'createdAt' => '\DateTime',
+ 'details' => '\OpenAPI\Client\Model\LoyaltyCardTransactionDetails',
+ 'type' => 'string'
];
/**
@@ -84,10 +84,10 @@ class LoyaltyCardTransaction implements ModelInterface, ArrayAccess, \JsonSerial
'campaignId' => null,
'source' => null,
'reason' => null,
- 'type' => null,
- 'details' => null,
'relatedTransactionId' => null,
- 'createdAt' => 'date-time'
+ 'createdAt' => 'date-time',
+ 'details' => null,
+ 'type' => null
];
/**
@@ -102,10 +102,10 @@ class LoyaltyCardTransaction implements ModelInterface, ArrayAccess, \JsonSerial
'campaignId' => true,
'source' => true,
'reason' => true,
- 'type' => true,
- 'details' => true,
'relatedTransactionId' => true,
- 'createdAt' => true
+ 'createdAt' => true,
+ 'details' => true,
+ 'type' => true
];
/**
@@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool
'campaignId' => 'campaign_id',
'source' => 'source',
'reason' => 'reason',
- 'type' => 'type',
- 'details' => 'details',
'relatedTransactionId' => 'related_transaction_id',
- 'createdAt' => 'created_at'
+ 'createdAt' => 'created_at',
+ 'details' => 'details',
+ 'type' => 'type'
];
/**
@@ -218,10 +218,10 @@ public function isNullableSetToNull(string $property): bool
'campaignId' => 'setCampaignId',
'source' => 'setSource',
'reason' => 'setReason',
- 'type' => 'setType',
- 'details' => 'setDetails',
'relatedTransactionId' => 'setRelatedTransactionId',
- 'createdAt' => 'setCreatedAt'
+ 'createdAt' => 'setCreatedAt',
+ 'details' => 'setDetails',
+ 'type' => 'setType'
];
/**
@@ -236,10 +236,10 @@ public function isNullableSetToNull(string $property): bool
'campaignId' => 'getCampaignId',
'source' => 'getSource',
'reason' => 'getReason',
- 'type' => 'getType',
- 'details' => 'getDetails',
'relatedTransactionId' => 'getRelatedTransactionId',
- 'createdAt' => 'getCreatedAt'
+ 'createdAt' => 'getCreatedAt',
+ 'details' => 'getDetails',
+ 'type' => 'getType'
];
/**
@@ -332,10 +332,10 @@ public function __construct(array $data = null)
$this->setIfExists('campaignId', $data ?? [], null);
$this->setIfExists('source', $data ?? [], null);
$this->setIfExists('reason', $data ?? [], null);
- $this->setIfExists('type', $data ?? [], null);
- $this->setIfExists('details', $data ?? [], null);
$this->setIfExists('relatedTransactionId', $data ?? [], null);
$this->setIfExists('createdAt', $data ?? [], null);
+ $this->setIfExists('details', $data ?? [], null);
+ $this->setIfExists('type', $data ?? [], null);
}
/**
@@ -594,147 +594,147 @@ public function setReason($reason)
}
/**
- * Gets type
+ * Gets relatedTransactionId
*
* @return string|null
*/
- public function getType()
+ public function getRelatedTransactionId()
{
- return $this->container['type'];
+ return $this->container['relatedTransactionId'];
}
/**
- * Sets type
+ * Sets relatedTransactionId
*
- * @param string|null $type type
+ * @param string|null $relatedTransactionId The related transaction ID on the receiving card.
*
* @return self
*/
- public function setType($type)
+ public function setRelatedTransactionId($relatedTransactionId)
{
- if (is_null($type)) {
- array_push($this->openAPINullablesSetToNull, 'type');
+ if (is_null($relatedTransactionId)) {
+ array_push($this->openAPINullablesSetToNull, 'relatedTransactionId');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('type', $nullablesSetToNull);
+ $index = array_search('relatedTransactionId', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $allowedValues = $this->getTypeAllowableValues();
- if (!is_null($type) && !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;
+ $this->container['relatedTransactionId'] = $relatedTransactionId;
return $this;
}
/**
- * Gets details
+ * Gets createdAt
*
- * @return \OpenAPI\Client\Model\LoyaltyCardTransactionDetails|null
+ * @return \DateTime|null
*/
- public function getDetails()
+ public function getCreatedAt()
{
- return $this->container['details'];
+ return $this->container['createdAt'];
}
/**
- * Sets details
+ * Sets createdAt
*
- * @param \OpenAPI\Client\Model\LoyaltyCardTransactionDetails|null $details details
+ * @param \DateTime|null $createdAt Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
*
* @return self
*/
- public function setDetails($details)
+ public function setCreatedAt($createdAt)
{
- if (is_null($details)) {
- array_push($this->openAPINullablesSetToNull, 'details');
+ if (is_null($createdAt)) {
+ array_push($this->openAPINullablesSetToNull, 'createdAt');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('details', $nullablesSetToNull);
+ $index = array_search('createdAt', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['details'] = $details;
+ $this->container['createdAt'] = $createdAt;
return $this;
}
/**
- * Gets relatedTransactionId
+ * Gets details
*
- * @return string|null
+ * @return \OpenAPI\Client\Model\LoyaltyCardTransactionDetails|null
*/
- public function getRelatedTransactionId()
+ public function getDetails()
{
- return $this->container['relatedTransactionId'];
+ return $this->container['details'];
}
/**
- * Sets relatedTransactionId
+ * Sets details
*
- * @param string|null $relatedTransactionId The related transaction ID on the receiving card.
+ * @param \OpenAPI\Client\Model\LoyaltyCardTransactionDetails|null $details details
*
* @return self
*/
- public function setRelatedTransactionId($relatedTransactionId)
+ public function setDetails($details)
{
- if (is_null($relatedTransactionId)) {
- array_push($this->openAPINullablesSetToNull, 'relatedTransactionId');
+ if (is_null($details)) {
+ array_push($this->openAPINullablesSetToNull, 'details');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('relatedTransactionId', $nullablesSetToNull);
+ $index = array_search('details', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['relatedTransactionId'] = $relatedTransactionId;
+ $this->container['details'] = $details;
return $this;
}
/**
- * Gets createdAt
+ * Gets type
*
- * @return \DateTime|null
+ * @return string|null
*/
- public function getCreatedAt()
+ public function getType()
{
- return $this->container['createdAt'];
+ return $this->container['type'];
}
/**
- * Sets createdAt
+ * Sets type
*
- * @param \DateTime|null $createdAt Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
+ * @param string|null $type Transaction types concerning loyalty points.
*
* @return self
*/
- public function setCreatedAt($createdAt)
+ public function setType($type)
{
- if (is_null($createdAt)) {
- array_push($this->openAPINullablesSetToNull, 'createdAt');
+ if (is_null($type)) {
+ array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('createdAt', $nullablesSetToNull);
+ $index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['createdAt'] = $createdAt;
+ $allowedValues = $this->getTypeAllowableValues();
+ if (!is_null($type) && !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;
}
diff --git a/src/Model/LoyaltyCardTransactionDetails.php b/src/Model/LoyaltyCardTransactionDetails.php
index 5049522..a92eea3 100644
--- a/src/Model/LoyaltyCardTransactionDetails.php
+++ b/src/Model/LoyaltyCardTransactionDetails.php
@@ -103,7 +103,7 @@ class LoyaltyCardTransactionDetails implements ModelInterface, ArrayAccess, \Jso
* @var boolean[]
*/
protected static array $openAPINullables = [
- 'balance' => true,
+ 'balance' => false,
'order' => true,
'event' => true,
'earningRule' => true,
@@ -395,14 +395,7 @@ public function getBalance()
public function setBalance($balance)
{
if (is_null($balance)) {
- array_push($this->openAPINullablesSetToNull, 'balance');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('balance', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
+ throw new \InvalidArgumentException('non-nullable balance cannot be null');
}
$this->container['balance'] = $balance;
diff --git a/src/Model/LoyaltyCardTransactionDetailsBalance.php b/src/Model/LoyaltyCardTransactionDetailsBalance.php
index 6280737..621e9d4 100644
--- a/src/Model/LoyaltyCardTransactionDetailsBalance.php
+++ b/src/Model/LoyaltyCardTransactionDetailsBalance.php
@@ -64,6 +64,7 @@ class LoyaltyCardTransactionDetailsBalance implements ModelInterface, ArrayAcces
'object' => 'string',
'points' => 'int',
'balance' => 'int',
+ 'operationType' => 'string',
'relatedObject' => '\OpenAPI\Client\Model\LoyaltyCardTransactionDetailsBalanceRelatedObject'
];
@@ -80,6 +81,7 @@ class LoyaltyCardTransactionDetailsBalance implements ModelInterface, ArrayAcces
'object' => null,
'points' => null,
'balance' => null,
+ 'operationType' => null,
'relatedObject' => null
];
@@ -94,6 +96,7 @@ class LoyaltyCardTransactionDetailsBalance implements ModelInterface, ArrayAcces
'object' => true,
'points' => true,
'balance' => true,
+ 'operationType' => true,
'relatedObject' => true
];
@@ -188,6 +191,7 @@ public function isNullableSetToNull(string $property): bool
'object' => 'object',
'points' => 'points',
'balance' => 'balance',
+ 'operationType' => 'operation_type',
'relatedObject' => 'related_object'
];
@@ -202,6 +206,7 @@ public function isNullableSetToNull(string $property): bool
'object' => 'setObject',
'points' => 'setPoints',
'balance' => 'setBalance',
+ 'operationType' => 'setOperationType',
'relatedObject' => 'setRelatedObject'
];
@@ -216,6 +221,7 @@ public function isNullableSetToNull(string $property): bool
'object' => 'getObject',
'points' => 'getPoints',
'balance' => 'getBalance',
+ 'operationType' => 'getOperationType',
'relatedObject' => 'getRelatedObject'
];
@@ -261,7 +267,10 @@ public function getModelName()
}
public const TYPE_LOYALTY_CARD = 'loyalty_card';
+ public const TYPE_GIFT_VOUCHER = 'gift_voucher';
public const OBJECT_BALANCE = 'balance';
+ public const OPERATION_TYPE_MANUAL = 'MANUAL';
+ public const OPERATION_TYPE_AUTOMATIC = 'AUTOMATIC';
/**
* Gets allowable values of the enum
@@ -272,6 +281,7 @@ public function getTypeAllowableValues()
{
return [
self::TYPE_LOYALTY_CARD,
+ self::TYPE_GIFT_VOUCHER,
];
}
@@ -287,6 +297,19 @@ public function getObjectAllowableValues()
];
}
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getOperationTypeAllowableValues()
+ {
+ return [
+ self::OPERATION_TYPE_MANUAL,
+ self::OPERATION_TYPE_AUTOMATIC,
+ ];
+ }
+
/**
* Associative array for storing property values
*
@@ -302,11 +325,12 @@ public function getObjectAllowableValues()
*/
public function __construct(array $data = null)
{
- $this->setIfExists('type', $data ?? [], 'loyalty_card');
+ $this->setIfExists('type', $data ?? [], null);
$this->setIfExists('total', $data ?? [], null);
$this->setIfExists('object', $data ?? [], 'balance');
$this->setIfExists('points', $data ?? [], null);
$this->setIfExists('balance', $data ?? [], null);
+ $this->setIfExists('operationType', $data ?? [], null);
$this->setIfExists('relatedObject', $data ?? [], null);
}
@@ -346,10 +370,6 @@ public function listInvalidProperties()
);
}
- if (!is_null($this->container['type']) && !preg_match("/loyalty_card/", $this->container['type'])) {
- $invalidProperties[] = "invalid value for 'type', must be conform to the pattern /loyalty_card/.";
- }
-
$allowedValues = $this->getObjectAllowableValues();
if (!is_null($this->container['object']) && !in_array($this->container['object'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
@@ -359,8 +379,13 @@ public function listInvalidProperties()
);
}
- if (!is_null($this->container['object']) && !preg_match("/balance/", $this->container['object'])) {
- $invalidProperties[] = "invalid value for 'object', must be conform to the pattern /balance/.";
+ $allowedValues = $this->getOperationTypeAllowableValues();
+ if (!is_null($this->container['operationType']) && !in_array($this->container['operationType'], $allowedValues, true)) {
+ $invalidProperties[] = sprintf(
+ "invalid value '%s' for 'operationType', must be one of '%s'",
+ $this->container['operationType'],
+ implode("', '", $allowedValues)
+ );
}
return $invalidProperties;
@@ -417,11 +442,6 @@ public function setType($type)
)
);
}
-
- if (!is_null($type) && (!preg_match("/loyalty_card/", $type))) {
- throw new \InvalidArgumentException("invalid value for \$type when calling LoyaltyCardTransactionDetailsBalance., must conform to the pattern /loyalty_card/.");
- }
-
$this->container['type'] = $type;
return $this;
@@ -440,7 +460,7 @@ public function getTotal()
/**
* Sets total
*
- * @param int|null $total The number of all points accumulated on the card as affected by add or subtract operations.
+ * @param int|null $total The number of all points or credits accumulated on the card as affected by add or subtract operations.
*
* @return self
*/
@@ -500,11 +520,6 @@ public function setObject($object)
)
);
}
-
- if (!is_null($object) && (!preg_match("/balance/", $object))) {
- throw new \InvalidArgumentException("invalid value for \$object when calling LoyaltyCardTransactionDetailsBalance., must conform to the pattern /balance/.");
- }
-
$this->container['object'] = $object;
return $this;
@@ -523,7 +538,7 @@ public function getPoints()
/**
* Sets points
*
- * @param int|null $points Points added or subtracted in the transaction.
+ * @param int|null $points Points added or subtracted in the transaction of a loyalty card.
*
* @return self
*/
@@ -557,7 +572,7 @@ public function getBalance()
/**
* Sets balance
*
- * @param int|null $balance The available points on the card after the transaction as affected by redemption or rollback.
+ * @param int|null $balance The available points or credits on the card after the transaction as affected by redemption or rollback.
*
* @return self
*/
@@ -578,6 +593,50 @@ public function setBalance($balance)
return $this;
}
+ /**
+ * Gets operationType
+ *
+ * @return string|null
+ */
+ public function getOperationType()
+ {
+ return $this->container['operationType'];
+ }
+
+ /**
+ * Sets operationType
+ *
+ * @param string|null $operationType The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.
+ *
+ * @return self
+ */
+ public function setOperationType($operationType)
+ {
+ if (is_null($operationType)) {
+ array_push($this->openAPINullablesSetToNull, 'operationType');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('operationType', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getOperationTypeAllowableValues();
+ if (!is_null($operationType) && !in_array($operationType, $allowedValues, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ "Invalid value '%s' for 'operationType', must be one of '%s'",
+ $operationType,
+ implode("', '", $allowedValues)
+ )
+ );
+ }
+ $this->container['operationType'] = $operationType;
+
+ return $this;
+ }
+
/**
* Gets relatedObject
*
diff --git a/src/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.php b/src/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.php
index 94e6aea..aeb6551 100644
--- a/src/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.php
+++ b/src/Model/LoyaltyCardTransactionDetailsBalanceRelatedObject.php
@@ -305,10 +305,6 @@ public function listInvalidProperties()
);
}
- if (!is_null($this->container['type']) && !preg_match("/voucher/", $this->container['type'])) {
- $invalidProperties[] = "invalid value for 'type', must be conform to the pattern /voucher/.";
- }
-
return $invalidProperties;
}
@@ -337,7 +333,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API.
+ * @param string|null $id Identifies the voucher that is being modified. The ID is assigned by the Voucherify API.
*
* @return self
*/
@@ -397,11 +393,6 @@ public function setType($type)
)
);
}
-
- if (!is_null($type) && (!preg_match("/voucher/", $type))) {
- throw new \InvalidArgumentException("invalid value for \$type when calling LoyaltyCardTransactionDetailsBalanceRelatedObject., must conform to the pattern /voucher/.");
- }
-
$this->container['type'] = $type;
return $this;
diff --git a/src/Model/LoyaltyPointsBucket.php b/src/Model/LoyaltyPointsBucket.php
new file mode 100644
index 0000000..817290b
--- /dev/null
+++ b/src/Model/LoyaltyPointsBucket.php
@@ -0,0 +1,778 @@
+
+ */
+class LoyaltyPointsBucket implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'LoyaltyPointsBucket';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'id' => 'string',
+ 'voucherId' => 'string',
+ 'campaignId' => 'string',
+ 'bucket' => '\OpenAPI\Client\Model\LoyaltyPointsBucketBucket',
+ 'status' => 'string',
+ 'expiresAt' => '\DateTime',
+ 'createdAt' => '\DateTime',
+ 'updatedAt' => '\DateTime',
+ 'object' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'id' => null,
+ 'voucherId' => null,
+ 'campaignId' => null,
+ 'bucket' => null,
+ 'status' => null,
+ 'expiresAt' => 'date-time',
+ 'createdAt' => 'date-time',
+ 'updatedAt' => 'date-time',
+ 'object' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'id' => true,
+ 'voucherId' => true,
+ 'campaignId' => true,
+ 'bucket' => true,
+ 'status' => true,
+ 'expiresAt' => true,
+ 'createdAt' => true,
+ 'updatedAt' => true,
+ 'object' => true
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * 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 nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'id' => 'id',
+ 'voucherId' => 'voucher_id',
+ 'campaignId' => 'campaign_id',
+ 'bucket' => 'bucket',
+ 'status' => 'status',
+ 'expiresAt' => 'expires_at',
+ 'createdAt' => 'created_at',
+ 'updatedAt' => 'updated_at',
+ 'object' => 'object'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'id' => 'setId',
+ 'voucherId' => 'setVoucherId',
+ 'campaignId' => 'setCampaignId',
+ 'bucket' => 'setBucket',
+ 'status' => 'setStatus',
+ 'expiresAt' => 'setExpiresAt',
+ 'createdAt' => 'setCreatedAt',
+ 'updatedAt' => 'setUpdatedAt',
+ 'object' => 'setObject'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'id' => 'getId',
+ 'voucherId' => 'getVoucherId',
+ 'campaignId' => 'getCampaignId',
+ 'bucket' => 'getBucket',
+ 'status' => 'getStatus',
+ 'expiresAt' => 'getExpiresAt',
+ 'createdAt' => 'getCreatedAt',
+ 'updatedAt' => 'getUpdatedAt',
+ 'object' => 'getObject'
+ ];
+
+ /**
+ * 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 OBJECT_LOYALTY_POINTS_BUCKET = 'loyalty_points_bucket';
+
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getObjectAllowableValues()
+ {
+ return [
+ self::OBJECT_LOYALTY_POINTS_BUCKET,
+ ];
+ }
+
+ /**
+ * 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->setIfExists('id', $data ?? [], null);
+ $this->setIfExists('voucherId', $data ?? [], null);
+ $this->setIfExists('campaignId', $data ?? [], null);
+ $this->setIfExists('bucket', $data ?? [], null);
+ $this->setIfExists('status', $data ?? [], null);
+ $this->setIfExists('expiresAt', $data ?? [], null);
+ $this->setIfExists('createdAt', $data ?? [], null);
+ $this->setIfExists('updatedAt', $data ?? [], null);
+ $this->setIfExists('object', $data ?? [], 'loyalty_points_bucket');
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ $allowedValues = $this->getObjectAllowableValues();
+ if (!is_null($this->container['object']) && !in_array($this->container['object'], $allowedValues, true)) {
+ $invalidProperties[] = sprintf(
+ "invalid value '%s' for 'object', must be one of '%s'",
+ $this->container['object'],
+ implode("', '", $allowedValues)
+ );
+ }
+
+ 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 id
+ *
+ * @return string|null
+ */
+ public function getId()
+ {
+ return $this->container['id'];
+ }
+
+ /**
+ * Sets id
+ *
+ * @param string|null $id Unique identifier of the loyalty points bucket.
+ *
+ * @return self
+ */
+ public function setId($id)
+ {
+ if (is_null($id)) {
+ array_push($this->openAPINullablesSetToNull, 'id');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('id', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['id'] = $id;
+
+ return $this;
+ }
+
+ /**
+ * Gets voucherId
+ *
+ * @return string|null
+ */
+ public function getVoucherId()
+ {
+ return $this->container['voucherId'];
+ }
+
+ /**
+ * Sets voucherId
+ *
+ * @param string|null $voucherId Unique identifier of the parent loyalty card.
+ *
+ * @return self
+ */
+ public function setVoucherId($voucherId)
+ {
+ if (is_null($voucherId)) {
+ array_push($this->openAPINullablesSetToNull, 'voucherId');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('voucherId', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['voucherId'] = $voucherId;
+
+ return $this;
+ }
+
+ /**
+ * Gets campaignId
+ *
+ * @return string|null
+ */
+ public function getCampaignId()
+ {
+ return $this->container['campaignId'];
+ }
+
+ /**
+ * Sets campaignId
+ *
+ * @param string|null $campaignId Unique identifier of the parent campaign.
+ *
+ * @return self
+ */
+ public function setCampaignId($campaignId)
+ {
+ if (is_null($campaignId)) {
+ array_push($this->openAPINullablesSetToNull, 'campaignId');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('campaignId', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['campaignId'] = $campaignId;
+
+ return $this;
+ }
+
+ /**
+ * Gets bucket
+ *
+ * @return \OpenAPI\Client\Model\LoyaltyPointsBucketBucket|null
+ */
+ public function getBucket()
+ {
+ return $this->container['bucket'];
+ }
+
+ /**
+ * Sets bucket
+ *
+ * @param \OpenAPI\Client\Model\LoyaltyPointsBucketBucket|null $bucket bucket
+ *
+ * @return self
+ */
+ public function setBucket($bucket)
+ {
+ if (is_null($bucket)) {
+ array_push($this->openAPINullablesSetToNull, 'bucket');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('bucket', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['bucket'] = $bucket;
+
+ return $this;
+ }
+
+ /**
+ * Gets status
+ *
+ * @return string|null
+ */
+ public function getStatus()
+ {
+ return $this->container['status'];
+ }
+
+ /**
+ * Sets status
+ *
+ * @param string|null $status Loyalty point point bucket status.
+ *
+ * @return self
+ */
+ public function setStatus($status)
+ {
+ if (is_null($status)) {
+ array_push($this->openAPINullablesSetToNull, 'status');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('status', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['status'] = $status;
+
+ return $this;
+ }
+
+ /**
+ * Gets expiresAt
+ *
+ * @return \DateTime|null
+ */
+ public function getExpiresAt()
+ {
+ return $this->container['expiresAt'];
+ }
+
+ /**
+ * Sets expiresAt
+ *
+ * @param \DateTime|null $expiresAt Date when the number of points defined in the bucket object are due to expire.
+ *
+ * @return self
+ */
+ public function setExpiresAt($expiresAt)
+ {
+ if (is_null($expiresAt)) {
+ array_push($this->openAPINullablesSetToNull, 'expiresAt');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('expiresAt', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['expiresAt'] = $expiresAt;
+
+ return $this;
+ }
+
+ /**
+ * Gets createdAt
+ *
+ * @return \DateTime|null
+ */
+ public function getCreatedAt()
+ {
+ return $this->container['createdAt'];
+ }
+
+ /**
+ * Sets createdAt
+ *
+ * @param \DateTime|null $createdAt Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format.
+ *
+ * @return self
+ */
+ public function setCreatedAt($createdAt)
+ {
+ if (is_null($createdAt)) {
+ array_push($this->openAPINullablesSetToNull, 'createdAt');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('createdAt', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['createdAt'] = $createdAt;
+
+ return $this;
+ }
+
+ /**
+ * Gets updatedAt
+ *
+ * @return \DateTime|null
+ */
+ public function getUpdatedAt()
+ {
+ return $this->container['updatedAt'];
+ }
+
+ /**
+ * Sets updatedAt
+ *
+ * @param \DateTime|null $updatedAt Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format.
+ *
+ * @return self
+ */
+ public function setUpdatedAt($updatedAt)
+ {
+ if (is_null($updatedAt)) {
+ array_push($this->openAPINullablesSetToNull, 'updatedAt');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('updatedAt', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['updatedAt'] = $updatedAt;
+
+ return $this;
+ }
+
+ /**
+ * Gets object
+ *
+ * @return string|null
+ */
+ public function getObject()
+ {
+ return $this->container['object'];
+ }
+
+ /**
+ * Sets object
+ *
+ * @param string|null $object The type of the object represented by JSON. This object stores information about the loyalty point bucket.
+ *
+ * @return self
+ */
+ public function setObject($object)
+ {
+ if (is_null($object)) {
+ array_push($this->openAPINullablesSetToNull, 'object');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('object', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getObjectAllowableValues();
+ if (!is_null($object) && !in_array($object, $allowedValues, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ "Invalid value '%s' for 'object', must be one of '%s'",
+ $object,
+ implode("', '", $allowedValues)
+ )
+ );
+ }
+ $this->container['object'] = $object;
+
+ 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/src/Model/LoyaltyPointsBucketBucket.php b/src/Model/LoyaltyPointsBucketBucket.php
new file mode 100644
index 0000000..0603987
--- /dev/null
+++ b/src/Model/LoyaltyPointsBucketBucket.php
@@ -0,0 +1,418 @@
+
+ */
+class LoyaltyPointsBucketBucket implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'LoyaltyPointsBucketBucket';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'totalPoints' => 'int'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'totalPoints' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'totalPoints' => true
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * 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 nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'totalPoints' => 'total_points'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'totalPoints' => 'setTotalPoints'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'totalPoints' => 'getTotalPoints'
+ ];
+
+ /**
+ * 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->setIfExists('totalPoints', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * 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 totalPoints
+ *
+ * @return int|null
+ */
+ public function getTotalPoints()
+ {
+ return $this->container['totalPoints'];
+ }
+
+ /**
+ * Sets totalPoints
+ *
+ * @param int|null $totalPoints Total number of points in the loyalty point bucket.
+ *
+ * @return self
+ */
+ public function setTotalPoints($totalPoints)
+ {
+ if (is_null($totalPoints)) {
+ array_push($this->openAPINullablesSetToNull, 'totalPoints');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('totalPoints', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['totalPoints'] = $totalPoints;
+
+ 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/src/Model/Order.php b/src/Model/Order.php
index d4e77a2..31b851e 100644
--- a/src/Model/Order.php
+++ b/src/Model/Order.php
@@ -629,7 +629,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrderCalculated.php b/src/Model/OrderCalculated.php
index 1533527..06a9c50 100644
--- a/src/Model/OrderCalculated.php
+++ b/src/Model/OrderCalculated.php
@@ -953,7 +953,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrderCalculatedItem.php b/src/Model/OrderCalculatedItem.php
index 524d38e..90c6c3d 100644
--- a/src/Model/OrderCalculatedItem.php
+++ b/src/Model/OrderCalculatedItem.php
@@ -1189,7 +1189,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrderCalculatedItemProduct.php b/src/Model/OrderCalculatedItemProduct.php
index 012a175..ead3809 100644
--- a/src/Model/OrderCalculatedItemProduct.php
+++ b/src/Model/OrderCalculatedItemProduct.php
@@ -475,7 +475,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/OrderCalculatedItemSku.php b/src/Model/OrderCalculatedItemSku.php
index 2e2ead7..6a009c5 100644
--- a/src/Model/OrderCalculatedItemSku.php
+++ b/src/Model/OrderCalculatedItemSku.php
@@ -63,7 +63,8 @@ class OrderCalculatedItemSku implements ModelInterface, ArrayAccess, \JsonSerial
'sourceId' => 'string',
'override' => 'bool',
'sku' => 'string',
- 'price' => 'float'
+ 'price' => 'float',
+ 'metadata' => 'object'
];
/**
@@ -78,7 +79,8 @@ class OrderCalculatedItemSku implements ModelInterface, ArrayAccess, \JsonSerial
'sourceId' => null,
'override' => null,
'sku' => null,
- 'price' => null
+ 'price' => null,
+ 'metadata' => null
];
/**
@@ -91,7 +93,8 @@ class OrderCalculatedItemSku implements ModelInterface, ArrayAccess, \JsonSerial
'sourceId' => true,
'override' => true,
'sku' => true,
- 'price' => true
+ 'price' => true,
+ 'metadata' => true
];
/**
@@ -184,7 +187,8 @@ public function isNullableSetToNull(string $property): bool
'sourceId' => 'source_id',
'override' => 'override',
'sku' => 'sku',
- 'price' => 'price'
+ 'price' => 'price',
+ 'metadata' => 'metadata'
];
/**
@@ -197,7 +201,8 @@ public function isNullableSetToNull(string $property): bool
'sourceId' => 'setSourceId',
'override' => 'setOverride',
'sku' => 'setSku',
- 'price' => 'setPrice'
+ 'price' => 'setPrice',
+ 'metadata' => 'setMetadata'
];
/**
@@ -210,7 +215,8 @@ public function isNullableSetToNull(string $property): bool
'sourceId' => 'getSourceId',
'override' => 'getOverride',
'sku' => 'getSku',
- 'price' => 'getPrice'
+ 'price' => 'getPrice',
+ 'metadata' => 'getMetadata'
];
/**
@@ -275,6 +281,7 @@ public function __construct(array $data = null)
$this->setIfExists('override', $data ?? [], null);
$this->setIfExists('sku', $data ?? [], null);
$this->setIfExists('price', $data ?? [], null);
+ $this->setIfExists('metadata', $data ?? [], null);
}
/**
@@ -488,6 +495,40 @@ public function setPrice($price)
return $this;
}
+
+ /**
+ * Gets metadata
+ *
+ * @return object|null
+ */
+ public function getMetadata()
+ {
+ return $this->container['metadata'];
+ }
+
+ /**
+ * Sets metadata
+ *
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
+ *
+ * @return self
+ */
+ public function setMetadata($metadata)
+ {
+ if (is_null($metadata)) {
+ array_push($this->openAPINullablesSetToNull, 'metadata');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('metadata', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['metadata'] = $metadata;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/OrderItem.php b/src/Model/OrderItem.php
index 79145fd..ee098a8 100644
--- a/src/Model/OrderItem.php
+++ b/src/Model/OrderItem.php
@@ -870,7 +870,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to define business validation rules.
*
* @return self
*/
diff --git a/src/Model/OrderItemProduct.php b/src/Model/OrderItemProduct.php
index 98e5db3..f7724fd 100644
--- a/src/Model/OrderItemProduct.php
+++ b/src/Model/OrderItemProduct.php
@@ -475,7 +475,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/OrderItemSku.php b/src/Model/OrderItemSku.php
index 3ba9179..b472e3a 100644
--- a/src/Model/OrderItemSku.php
+++ b/src/Model/OrderItemSku.php
@@ -63,7 +63,8 @@ class OrderItemSku implements ModelInterface, ArrayAccess, \JsonSerializable
'sourceId' => 'string',
'override' => 'bool',
'sku' => 'string',
- 'price' => 'float'
+ 'price' => 'float',
+ 'metadata' => 'object'
];
/**
@@ -78,7 +79,8 @@ class OrderItemSku implements ModelInterface, ArrayAccess, \JsonSerializable
'sourceId' => null,
'override' => null,
'sku' => null,
- 'price' => null
+ 'price' => null,
+ 'metadata' => null
];
/**
@@ -91,7 +93,8 @@ class OrderItemSku implements ModelInterface, ArrayAccess, \JsonSerializable
'sourceId' => true,
'override' => true,
'sku' => true,
- 'price' => true
+ 'price' => true,
+ 'metadata' => true
];
/**
@@ -184,7 +187,8 @@ public function isNullableSetToNull(string $property): bool
'sourceId' => 'source_id',
'override' => 'override',
'sku' => 'sku',
- 'price' => 'price'
+ 'price' => 'price',
+ 'metadata' => 'metadata'
];
/**
@@ -197,7 +201,8 @@ public function isNullableSetToNull(string $property): bool
'sourceId' => 'setSourceId',
'override' => 'setOverride',
'sku' => 'setSku',
- 'price' => 'setPrice'
+ 'price' => 'setPrice',
+ 'metadata' => 'setMetadata'
];
/**
@@ -210,7 +215,8 @@ public function isNullableSetToNull(string $property): bool
'sourceId' => 'getSourceId',
'override' => 'getOverride',
'sku' => 'getSku',
- 'price' => 'getPrice'
+ 'price' => 'getPrice',
+ 'metadata' => 'getMetadata'
];
/**
@@ -275,6 +281,7 @@ public function __construct(array $data = null)
$this->setIfExists('override', $data ?? [], null);
$this->setIfExists('sku', $data ?? [], null);
$this->setIfExists('price', $data ?? [], null);
+ $this->setIfExists('metadata', $data ?? [], null);
}
/**
@@ -488,6 +495,40 @@ public function setPrice($price)
return $this;
}
+
+ /**
+ * Gets metadata
+ *
+ * @return object|null
+ */
+ public function getMetadata()
+ {
+ return $this->container['metadata'];
+ }
+
+ /**
+ * Sets metadata
+ *
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to create product collections.
+ *
+ * @return self
+ */
+ public function setMetadata($metadata)
+ {
+ if (is_null($metadata)) {
+ array_push($this->openAPINullablesSetToNull, 'metadata');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('metadata', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['metadata'] = $metadata;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/OrdersCreateRequestBody.php b/src/Model/OrdersCreateRequestBody.php
index a7eb12f..7b36e7e 100644
--- a/src/Model/OrdersCreateRequestBody.php
+++ b/src/Model/OrdersCreateRequestBody.php
@@ -657,7 +657,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrdersCreateResponseBody.php b/src/Model/OrdersCreateResponseBody.php
index 40df9b0..14ce6d9 100644
--- a/src/Model/OrdersCreateResponseBody.php
+++ b/src/Model/OrdersCreateResponseBody.php
@@ -953,7 +953,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrdersGetResponseBody.php b/src/Model/OrdersGetResponseBody.php
index 8b6d06f..01b03a3 100644
--- a/src/Model/OrdersGetResponseBody.php
+++ b/src/Model/OrdersGetResponseBody.php
@@ -953,7 +953,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrdersImportCreateRequestBodyItem.php b/src/Model/OrdersImportCreateRequestBodyItem.php
index eb216b2..7fffd50 100644
--- a/src/Model/OrdersImportCreateRequestBodyItem.php
+++ b/src/Model/OrdersImportCreateRequestBodyItem.php
@@ -656,7 +656,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrdersUpdateRequestBody.php b/src/Model/OrdersUpdateRequestBody.php
index 8769600..09382fd 100644
--- a/src/Model/OrdersUpdateRequestBody.php
+++ b/src/Model/OrdersUpdateRequestBody.php
@@ -616,7 +616,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/OrdersUpdateResponseBody.php b/src/Model/OrdersUpdateResponseBody.php
index 380c491..39b6dd2 100644
--- a/src/Model/OrdersUpdateResponseBody.php
+++ b/src/Model/OrdersUpdateResponseBody.php
@@ -953,7 +953,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/ParameterExpandListCampaigns.php b/src/Model/ParameterExpandListCampaigns.php
index bba8a81..8cc953a 100644
--- a/src/Model/ParameterExpandListCampaigns.php
+++ b/src/Model/ParameterExpandListCampaigns.php
@@ -42,6 +42,8 @@ enum ParameterExpandListCampaigns: string
{
case CATEGORY = 'category';
+ case ACCESS_SETTINGS_ASSIGNMENTS = 'access_settings_assignments';
+
}
diff --git a/src/Model/Product.php b/src/Model/Product.php
index 04b75e5..38f96a2 100644
--- a/src/Model/Product.php
+++ b/src/Model/Product.php
@@ -566,7 +566,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductCollectionsProductsListResponseBodyDataItem.php b/src/Model/ProductCollectionsProductsListResponseBodyDataItem.php
index 59523de..e9e9554 100644
--- a/src/Model/ProductCollectionsProductsListResponseBodyDataItem.php
+++ b/src/Model/ProductCollectionsProductsListResponseBodyDataItem.php
@@ -574,7 +574,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. and The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections. and The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductWithoutSkus.php b/src/Model/ProductWithoutSkus.php
index 7425969..1ceac6e 100644
--- a/src/Model/ProductWithoutSkus.php
+++ b/src/Model/ProductWithoutSkus.php
@@ -558,7 +558,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductsCreateResponseBody.php b/src/Model/ProductsCreateResponseBody.php
index db909c6..bc640e6 100644
--- a/src/Model/ProductsCreateResponseBody.php
+++ b/src/Model/ProductsCreateResponseBody.php
@@ -566,7 +566,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductsGetResponseBody.php b/src/Model/ProductsGetResponseBody.php
index dbd1bc0..6c915dd 100644
--- a/src/Model/ProductsGetResponseBody.php
+++ b/src/Model/ProductsGetResponseBody.php
@@ -566,7 +566,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductsSkusCreateResponseBody.php b/src/Model/ProductsSkusCreateResponseBody.php
index 3b01b87..01fd515 100644
--- a/src/Model/ProductsSkusCreateResponseBody.php
+++ b/src/Model/ProductsSkusCreateResponseBody.php
@@ -675,7 +675,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductsSkusUpdateResponseBody.php b/src/Model/ProductsSkusUpdateResponseBody.php
index bcdd6e6..77f896e 100644
--- a/src/Model/ProductsSkusUpdateResponseBody.php
+++ b/src/Model/ProductsSkusUpdateResponseBody.php
@@ -675,7 +675,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/ProductsUpdateResponseBody.php b/src/Model/ProductsUpdateResponseBody.php
index e62c9e9..3d19491 100644
--- a/src/Model/ProductsUpdateResponseBody.php
+++ b/src/Model/ProductsUpdateResponseBody.php
@@ -566,7 +566,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/RedemptionEntryOrder.php b/src/Model/RedemptionEntryOrder.php
index ae40bd3..8e1cc42 100644
--- a/src/Model/RedemptionEntryOrder.php
+++ b/src/Model/RedemptionEntryOrder.php
@@ -952,7 +952,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/RedemptionsGetResponseBodyOrder.php b/src/Model/RedemptionsGetResponseBodyOrder.php
index f45cd26..f5e4d5b 100644
--- a/src/Model/RedemptionsGetResponseBodyOrder.php
+++ b/src/Model/RedemptionsGetResponseBodyOrder.php
@@ -952,7 +952,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/RedemptionsListResponseBodyRedemptionsItemOrder.php b/src/Model/RedemptionsListResponseBodyRedemptionsItemOrder.php
index a3177ef..dbedb2e 100644
--- a/src/Model/RedemptionsListResponseBodyRedemptionsItemOrder.php
+++ b/src/Model/RedemptionsListResponseBodyRedemptionsItemOrder.php
@@ -952,7 +952,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format.
+ * @param object|null $metadata A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.
*
* @return self
*/
diff --git a/src/Model/Sku.php b/src/Model/Sku.php
index 4cc63f4..56e7c96 100644
--- a/src/Model/Sku.php
+++ b/src/Model/Sku.php
@@ -675,7 +675,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/SkusGetResponseBody.php b/src/Model/SkusGetResponseBody.php
index f8ca7bd..2d4706a 100644
--- a/src/Model/SkusGetResponseBody.php
+++ b/src/Model/SkusGetResponseBody.php
@@ -675,7 +675,7 @@ public function getMetadata()
/**
* Sets metadata
*
- * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format.
+ * @param object|null $metadata The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections.
*
* @return self
*/
diff --git a/src/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.php b/src/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.php
index 7ac09a2..abfee5f 100644
--- a/src/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.php
+++ b/src/Model/TemplatesCampaignsCampaignSetupCreateRequestBody.php
@@ -533,7 +533,7 @@ public function getType()
/**
* Sets type
*
- * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ * @param string|null $type Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of standalone vouchers. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
*
* @return self
*/
diff --git a/src/Model/ValidationsRedeemableInapplicable.php b/src/Model/ValidationsRedeemableInapplicable.php
index c38928b..afa224c 100644
--- a/src/Model/ValidationsRedeemableInapplicable.php
+++ b/src/Model/ValidationsRedeemableInapplicable.php
@@ -65,7 +65,8 @@ class ValidationsRedeemableInapplicable implements ModelInterface, ArrayAccess,
'metadata' => 'object',
'categories' => '\OpenAPI\Client\Model\CategoryWithStackingRulesType[]',
'campaignName' => 'string',
- 'campaignId' => 'string'
+ 'campaignId' => 'string',
+ 'name' => 'string'
];
/**
@@ -83,7 +84,8 @@ class ValidationsRedeemableInapplicable implements ModelInterface, ArrayAccess,
'metadata' => null,
'categories' => null,
'campaignName' => null,
- 'campaignId' => null
+ 'campaignId' => null,
+ 'name' => null
];
/**
@@ -99,7 +101,8 @@ class ValidationsRedeemableInapplicable implements ModelInterface, ArrayAccess,
'metadata' => true,
'categories' => true,
'campaignName' => true,
- 'campaignId' => true
+ 'campaignId' => true,
+ 'name' => true
];
/**
@@ -195,7 +198,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'metadata',
'categories' => 'categories',
'campaignName' => 'campaign_name',
- 'campaignId' => 'campaign_id'
+ 'campaignId' => 'campaign_id',
+ 'name' => 'name'
];
/**
@@ -211,7 +215,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'setMetadata',
'categories' => 'setCategories',
'campaignName' => 'setCampaignName',
- 'campaignId' => 'setCampaignId'
+ 'campaignId' => 'setCampaignId',
+ 'name' => 'setName'
];
/**
@@ -227,7 +232,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'getMetadata',
'categories' => 'getCategories',
'campaignName' => 'getCampaignName',
- 'campaignId' => 'getCampaignId'
+ 'campaignId' => 'getCampaignId',
+ 'name' => 'getName'
];
/**
@@ -323,6 +329,7 @@ public function __construct(array $data = null)
$this->setIfExists('categories', $data ?? [], null);
$this->setIfExists('campaignName', $data ?? [], null);
$this->setIfExists('campaignId', $data ?? [], null);
+ $this->setIfExists('name', $data ?? [], null);
}
/**
@@ -622,7 +629,7 @@ public function getCampaignName()
/**
* Sets campaignName
*
- * @param string|null $campaignName Campaign name
+ * @param string|null $campaignName Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -656,7 +663,7 @@ public function getCampaignId()
/**
* Sets campaignId
*
- * @param string|null $campaignId Unique campaign ID assigned by Voucherify.
+ * @param string|null $campaignId Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -676,6 +683,40 @@ public function setCampaignId($campaignId)
return $this;
}
+
+ /**
+ * Gets name
+ *
+ * @return string|null
+ */
+ public function getName()
+ {
+ return $this->container['name'];
+ }
+
+ /**
+ * Sets name
+ *
+ * @param string|null $name Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
+ *
+ * @return self
+ */
+ public function setName($name)
+ {
+ if (is_null($name)) {
+ array_push($this->openAPINullablesSetToNull, 'name');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('name', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['name'] = $name;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/ValidationsRedeemableSkipped.php b/src/Model/ValidationsRedeemableSkipped.php
index eba7111..668c418 100644
--- a/src/Model/ValidationsRedeemableSkipped.php
+++ b/src/Model/ValidationsRedeemableSkipped.php
@@ -65,7 +65,8 @@ class ValidationsRedeemableSkipped implements ModelInterface, ArrayAccess, \Json
'metadata' => 'object',
'categories' => '\OpenAPI\Client\Model\CategoryWithStackingRulesType[]',
'campaignName' => 'string',
- 'campaignId' => 'string'
+ 'campaignId' => 'string',
+ 'name' => 'string'
];
/**
@@ -83,7 +84,8 @@ class ValidationsRedeemableSkipped implements ModelInterface, ArrayAccess, \Json
'metadata' => null,
'categories' => null,
'campaignName' => null,
- 'campaignId' => null
+ 'campaignId' => null,
+ 'name' => null
];
/**
@@ -99,7 +101,8 @@ class ValidationsRedeemableSkipped implements ModelInterface, ArrayAccess, \Json
'metadata' => true,
'categories' => true,
'campaignName' => true,
- 'campaignId' => true
+ 'campaignId' => true,
+ 'name' => true
];
/**
@@ -195,7 +198,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'metadata',
'categories' => 'categories',
'campaignName' => 'campaign_name',
- 'campaignId' => 'campaign_id'
+ 'campaignId' => 'campaign_id',
+ 'name' => 'name'
];
/**
@@ -211,7 +215,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'setMetadata',
'categories' => 'setCategories',
'campaignName' => 'setCampaignName',
- 'campaignId' => 'setCampaignId'
+ 'campaignId' => 'setCampaignId',
+ 'name' => 'setName'
];
/**
@@ -227,7 +232,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'getMetadata',
'categories' => 'getCategories',
'campaignName' => 'getCampaignName',
- 'campaignId' => 'getCampaignId'
+ 'campaignId' => 'getCampaignId',
+ 'name' => 'getName'
];
/**
@@ -323,6 +329,7 @@ public function __construct(array $data = null)
$this->setIfExists('categories', $data ?? [], null);
$this->setIfExists('campaignName', $data ?? [], null);
$this->setIfExists('campaignId', $data ?? [], null);
+ $this->setIfExists('name', $data ?? [], null);
}
/**
@@ -622,7 +629,7 @@ public function getCampaignName()
/**
* Sets campaignName
*
- * @param string|null $campaignName Campaign name
+ * @param string|null $campaignName Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -656,7 +663,7 @@ public function getCampaignId()
/**
* Sets campaignId
*
- * @param string|null $campaignId Unique campaign ID assigned by Voucherify.
+ * @param string|null $campaignId Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -676,6 +683,40 @@ public function setCampaignId($campaignId)
return $this;
}
+
+ /**
+ * Gets name
+ *
+ * @return string|null
+ */
+ public function getName()
+ {
+ return $this->container['name'];
+ }
+
+ /**
+ * Sets name
+ *
+ * @param string|null $name Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
+ *
+ * @return self
+ */
+ public function setName($name)
+ {
+ if (is_null($name)) {
+ array_push($this->openAPINullablesSetToNull, 'name');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('name', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['name'] = $name;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/ValidationsValidateResponseBodyRedeemablesItem.php b/src/Model/ValidationsValidateResponseBodyRedeemablesItem.php
index 7a68bff..63c01cc 100644
--- a/src/Model/ValidationsValidateResponseBodyRedeemablesItem.php
+++ b/src/Model/ValidationsValidateResponseBodyRedeemablesItem.php
@@ -68,7 +68,8 @@ class ValidationsValidateResponseBodyRedeemablesItem implements ModelInterface,
'metadata' => 'object',
'categories' => '\OpenAPI\Client\Model\CategoryWithStackingRulesType[]',
'campaignName' => 'string',
- 'campaignId' => 'string'
+ 'campaignId' => 'string',
+ 'name' => 'string'
];
/**
@@ -89,7 +90,8 @@ class ValidationsValidateResponseBodyRedeemablesItem implements ModelInterface,
'metadata' => null,
'categories' => null,
'campaignName' => null,
- 'campaignId' => null
+ 'campaignId' => null,
+ 'name' => null
];
/**
@@ -108,7 +110,8 @@ class ValidationsValidateResponseBodyRedeemablesItem implements ModelInterface,
'metadata' => true,
'categories' => true,
'campaignName' => true,
- 'campaignId' => true
+ 'campaignId' => true,
+ 'name' => true
];
/**
@@ -207,7 +210,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'metadata',
'categories' => 'categories',
'campaignName' => 'campaign_name',
- 'campaignId' => 'campaign_id'
+ 'campaignId' => 'campaign_id',
+ 'name' => 'name'
];
/**
@@ -226,7 +230,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'setMetadata',
'categories' => 'setCategories',
'campaignName' => 'setCampaignName',
- 'campaignId' => 'setCampaignId'
+ 'campaignId' => 'setCampaignId',
+ 'name' => 'setName'
];
/**
@@ -245,7 +250,8 @@ public function isNullableSetToNull(string $property): bool
'metadata' => 'getMetadata',
'categories' => 'getCategories',
'campaignName' => 'getCampaignName',
- 'campaignId' => 'getCampaignId'
+ 'campaignId' => 'getCampaignId',
+ 'name' => 'getName'
];
/**
@@ -348,6 +354,7 @@ public function __construct(array $data = null)
$this->setIfExists('categories', $data ?? [], null);
$this->setIfExists('campaignName', $data ?? [], null);
$this->setIfExists('campaignId', $data ?? [], null);
+ $this->setIfExists('name', $data ?? [], null);
}
/**
@@ -714,7 +721,7 @@ public function getCampaignName()
/**
* Sets campaignName
*
- * @param string|null $campaignName Campaign name
+ * @param string|null $campaignName Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -748,7 +755,7 @@ public function getCampaignId()
/**
* Sets campaignId
*
- * @param string|null $campaignId Unique campaign ID assigned by Voucherify.
+ * @param string|null $campaignId Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
*
* @return self
*/
@@ -768,6 +775,40 @@ public function setCampaignId($campaignId)
return $this;
}
+
+ /**
+ * Gets name
+ *
+ * @return string|null
+ */
+ public function getName()
+ {
+ return $this->container['name'];
+ }
+
+ /**
+ * Sets name
+ *
+ * @param string|null $name Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.
+ *
+ * @return self
+ */
+ public function setName($name)
+ {
+ if (is_null($name)) {
+ array_push($this->openAPINullablesSetToNull, 'name');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('name', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['name'] = $name;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/src/Model/VoucherBalance.php b/src/Model/VoucherBalance.php
new file mode 100644
index 0000000..6354408
--- /dev/null
+++ b/src/Model/VoucherBalance.php
@@ -0,0 +1,764 @@
+
+ */
+class VoucherBalance implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'VoucherBalance';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'type' => 'string',
+ 'total' => 'int',
+ 'object' => 'string',
+ 'points' => 'int',
+ 'balance' => 'int',
+ 'operationType' => 'string',
+ 'relatedObject' => '\OpenAPI\Client\Model\VoucherBalanceRelatedObject'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'type' => null,
+ 'total' => null,
+ 'object' => null,
+ 'points' => null,
+ 'balance' => null,
+ 'operationType' => null,
+ 'relatedObject' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'type' => true,
+ 'total' => true,
+ 'object' => true,
+ 'points' => true,
+ 'balance' => true,
+ 'operationType' => true,
+ 'relatedObject' => true
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * 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 nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'type' => 'type',
+ 'total' => 'total',
+ 'object' => 'object',
+ 'points' => 'points',
+ 'balance' => 'balance',
+ 'operationType' => 'operation_type',
+ 'relatedObject' => 'related_object'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'type' => 'setType',
+ 'total' => 'setTotal',
+ 'object' => 'setObject',
+ 'points' => 'setPoints',
+ 'balance' => 'setBalance',
+ 'operationType' => 'setOperationType',
+ 'relatedObject' => 'setRelatedObject'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'type' => 'getType',
+ 'total' => 'getTotal',
+ 'object' => 'getObject',
+ 'points' => 'getPoints',
+ 'balance' => 'getBalance',
+ 'operationType' => 'getOperationType',
+ 'relatedObject' => 'getRelatedObject'
+ ];
+
+ /**
+ * 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_LOYALTY_CARD = 'loyalty_card';
+ public const TYPE_GIFT_VOUCHER = 'gift_voucher';
+ public const OBJECT_BALANCE = 'balance';
+ public const OPERATION_TYPE_MANUAL = 'MANUAL';
+ public const OPERATION_TYPE_AUTOMATIC = 'AUTOMATIC';
+
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getTypeAllowableValues()
+ {
+ return [
+ self::TYPE_LOYALTY_CARD,
+ self::TYPE_GIFT_VOUCHER,
+ ];
+ }
+
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getObjectAllowableValues()
+ {
+ return [
+ self::OBJECT_BALANCE,
+ ];
+ }
+
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getOperationTypeAllowableValues()
+ {
+ return [
+ self::OPERATION_TYPE_MANUAL,
+ self::OPERATION_TYPE_AUTOMATIC,
+ ];
+ }
+
+ /**
+ * 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->setIfExists('type', $data ?? [], null);
+ $this->setIfExists('total', $data ?? [], null);
+ $this->setIfExists('object', $data ?? [], 'balance');
+ $this->setIfExists('points', $data ?? [], null);
+ $this->setIfExists('balance', $data ?? [], null);
+ $this->setIfExists('operationType', $data ?? [], null);
+ $this->setIfExists('relatedObject', $data ?? [], null);
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ $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)
+ );
+ }
+
+ $allowedValues = $this->getObjectAllowableValues();
+ if (!is_null($this->container['object']) && !in_array($this->container['object'], $allowedValues, true)) {
+ $invalidProperties[] = sprintf(
+ "invalid value '%s' for 'object', must be one of '%s'",
+ $this->container['object'],
+ implode("', '", $allowedValues)
+ );
+ }
+
+ $allowedValues = $this->getOperationTypeAllowableValues();
+ if (!is_null($this->container['operationType']) && !in_array($this->container['operationType'], $allowedValues, true)) {
+ $invalidProperties[] = sprintf(
+ "invalid value '%s' for 'operationType', must be one of '%s'",
+ $this->container['operationType'],
+ implode("', '", $allowedValues)
+ );
+ }
+
+ 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|null
+ */
+ public function getType()
+ {
+ return $this->container['type'];
+ }
+
+ /**
+ * Sets type
+ *
+ * @param string|null $type The type of voucher whose balance is being adjusted due to the transaction.
+ *
+ * @return self
+ */
+ public function setType($type)
+ {
+ if (is_null($type)) {
+ array_push($this->openAPINullablesSetToNull, 'type');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('type', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getTypeAllowableValues();
+ if (!is_null($type) && !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 total
+ *
+ * @return int|null
+ */
+ public function getTotal()
+ {
+ return $this->container['total'];
+ }
+
+ /**
+ * Sets total
+ *
+ * @param int|null $total The number of all points or credits accumulated on the card as affected by add or subtract operations.
+ *
+ * @return self
+ */
+ public function setTotal($total)
+ {
+ if (is_null($total)) {
+ array_push($this->openAPINullablesSetToNull, 'total');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('total', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['total'] = $total;
+
+ return $this;
+ }
+
+ /**
+ * Gets object
+ *
+ * @return string|null
+ */
+ public function getObject()
+ {
+ return $this->container['object'];
+ }
+
+ /**
+ * Sets object
+ *
+ * @param string|null $object The type of the object represented by the JSON.
+ *
+ * @return self
+ */
+ public function setObject($object)
+ {
+ if (is_null($object)) {
+ array_push($this->openAPINullablesSetToNull, 'object');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('object', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getObjectAllowableValues();
+ if (!is_null($object) && !in_array($object, $allowedValues, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ "Invalid value '%s' for 'object', must be one of '%s'",
+ $object,
+ implode("', '", $allowedValues)
+ )
+ );
+ }
+ $this->container['object'] = $object;
+
+ return $this;
+ }
+
+ /**
+ * Gets points
+ *
+ * @return int|null
+ */
+ public function getPoints()
+ {
+ return $this->container['points'];
+ }
+
+ /**
+ * Sets points
+ *
+ * @param int|null $points Points added or subtracted in the transaction of a loyalty card.
+ *
+ * @return self
+ */
+ public function setPoints($points)
+ {
+ if (is_null($points)) {
+ array_push($this->openAPINullablesSetToNull, 'points');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('points', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['points'] = $points;
+
+ return $this;
+ }
+
+ /**
+ * Gets balance
+ *
+ * @return int|null
+ */
+ public function getBalance()
+ {
+ return $this->container['balance'];
+ }
+
+ /**
+ * Sets balance
+ *
+ * @param int|null $balance The available points or credits on the card after the transaction as affected by redemption or rollback.
+ *
+ * @return self
+ */
+ public function setBalance($balance)
+ {
+ if (is_null($balance)) {
+ array_push($this->openAPINullablesSetToNull, 'balance');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('balance', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['balance'] = $balance;
+
+ return $this;
+ }
+
+ /**
+ * Gets operationType
+ *
+ * @return string|null
+ */
+ public function getOperationType()
+ {
+ return $this->container['operationType'];
+ }
+
+ /**
+ * Sets operationType
+ *
+ * @param string|null $operationType The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.
+ *
+ * @return self
+ */
+ public function setOperationType($operationType)
+ {
+ if (is_null($operationType)) {
+ array_push($this->openAPINullablesSetToNull, 'operationType');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('operationType', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getOperationTypeAllowableValues();
+ if (!is_null($operationType) && !in_array($operationType, $allowedValues, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ "Invalid value '%s' for 'operationType', must be one of '%s'",
+ $operationType,
+ implode("', '", $allowedValues)
+ )
+ );
+ }
+ $this->container['operationType'] = $operationType;
+
+ return $this;
+ }
+
+ /**
+ * Gets relatedObject
+ *
+ * @return \OpenAPI\Client\Model\VoucherBalanceRelatedObject|null
+ */
+ public function getRelatedObject()
+ {
+ return $this->container['relatedObject'];
+ }
+
+ /**
+ * Sets relatedObject
+ *
+ * @param \OpenAPI\Client\Model\VoucherBalanceRelatedObject|null $relatedObject relatedObject
+ *
+ * @return self
+ */
+ public function setRelatedObject($relatedObject)
+ {
+ if (is_null($relatedObject)) {
+ array_push($this->openAPINullablesSetToNull, 'relatedObject');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('relatedObject', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['relatedObject'] = $relatedObject;
+
+ 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/src/Model/VoucherBalanceRelatedObject.php b/src/Model/VoucherBalanceRelatedObject.php
new file mode 100644
index 0000000..a32e313
--- /dev/null
+++ b/src/Model/VoucherBalanceRelatedObject.php
@@ -0,0 +1,491 @@
+
+ */
+class VoucherBalanceRelatedObject implements ModelInterface, ArrayAccess, \JsonSerializable
+{
+ public const DISCRIMINATOR = null;
+
+ /**
+ * The original name of the model.
+ *
+ * @var string
+ */
+ protected static $openAPIModelName = 'VoucherBalanceRelatedObject';
+
+ /**
+ * Array of property to type mappings. Used for (de)serialization
+ *
+ * @var string[]
+ */
+ protected static $openAPITypes = [
+ 'id' => 'string',
+ 'type' => 'string'
+ ];
+
+ /**
+ * Array of property to format mappings. Used for (de)serialization
+ *
+ * @var string[]
+ * @phpstan-var array
+ * @psalm-var array
+ */
+ protected static $openAPIFormats = [
+ 'id' => null,
+ 'type' => null
+ ];
+
+ /**
+ * Array of nullable properties. Used for (de)serialization
+ *
+ * @var boolean[]
+ */
+ protected static array $openAPINullables = [
+ 'id' => true,
+ 'type' => true
+ ];
+
+ /**
+ * If a nullable field gets set to null, insert it here
+ *
+ * @var boolean[]
+ */
+ protected array $openAPINullablesSetToNull = [];
+
+ /**
+ * 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 nullable properties
+ *
+ * @return array
+ */
+ protected static function openAPINullables(): array
+ {
+ return self::$openAPINullables;
+ }
+
+ /**
+ * Array of nullable field names deliberately set to null
+ *
+ * @return boolean[]
+ */
+ private function getOpenAPINullablesSetToNull(): array
+ {
+ return $this->openAPINullablesSetToNull;
+ }
+
+ /**
+ * Setter - Array of nullable field names deliberately set to null
+ *
+ * @param boolean[] $openAPINullablesSetToNull
+ */
+ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
+ {
+ $this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
+ }
+
+ /**
+ * Checks if a property is nullable
+ *
+ * @param string $property
+ * @return bool
+ */
+ public static function isNullable(string $property): bool
+ {
+ return self::openAPINullables()[$property] ?? false;
+ }
+
+ /**
+ * Checks if a nullable property is set to null.
+ *
+ * @param string $property
+ * @return bool
+ */
+ public function isNullableSetToNull(string $property): bool
+ {
+ return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
+ }
+
+ /**
+ * Array of attributes where the key is the local name,
+ * and the value is the original name
+ *
+ * @var string[]
+ */
+ protected static $attributeMap = [
+ 'id' => 'id',
+ 'type' => 'type'
+ ];
+
+ /**
+ * Array of attributes to setter functions (for deserialization of responses)
+ *
+ * @var string[]
+ */
+ protected static $setters = [
+ 'id' => 'setId',
+ 'type' => 'setType'
+ ];
+
+ /**
+ * Array of attributes to getter functions (for serialization of requests)
+ *
+ * @var string[]
+ */
+ protected static $getters = [
+ 'id' => 'getId',
+ '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;
+ }
+
+ public const TYPE_VOUCHER = 'voucher';
+
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getTypeAllowableValues()
+ {
+ return [
+ self::TYPE_VOUCHER,
+ ];
+ }
+
+ /**
+ * 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->setIfExists('id', $data ?? [], null);
+ $this->setIfExists('type', $data ?? [], 'voucher');
+ }
+
+ /**
+ * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
+ * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
+ * $this->openAPINullablesSetToNull array
+ *
+ * @param string $variableName
+ * @param array $fields
+ * @param mixed $defaultValue
+ */
+ private function setIfExists(string $variableName, array $fields, $defaultValue): void
+ {
+ if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
+ $this->openAPINullablesSetToNull[] = $variableName;
+ }
+
+ $this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
+ }
+
+ /**
+ * Show all the invalid properties with reasons.
+ *
+ * @return array invalid properties with reasons
+ */
+ public function listInvalidProperties()
+ {
+ $invalidProperties = [];
+
+ $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)
+ );
+ }
+
+ 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 id
+ *
+ * @return string|null
+ */
+ public function getId()
+ {
+ return $this->container['id'];
+ }
+
+ /**
+ * Sets id
+ *
+ * @param string|null $id Identifies the voucher that is being modified. The ID is assigned by the Voucherify API.
+ *
+ * @return self
+ */
+ public function setId($id)
+ {
+ if (is_null($id)) {
+ array_push($this->openAPINullablesSetToNull, 'id');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('id', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $this->container['id'] = $id;
+
+ return $this;
+ }
+
+ /**
+ * Gets type
+ *
+ * @return string|null
+ */
+ public function getType()
+ {
+ return $this->container['type'];
+ }
+
+ /**
+ * Sets type
+ *
+ * @param string|null $type The object being modified, i.e. voucher.
+ *
+ * @return self
+ */
+ public function setType($type)
+ {
+ if (is_null($type)) {
+ array_push($this->openAPINullablesSetToNull, 'type');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('type', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getTypeAllowableValues();
+ if (!is_null($type) && !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;
+ }
+ /**
+ * 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/src/Model/VoucherTransaction.php b/src/Model/VoucherTransaction.php
index 62b57cf..7066fee 100644
--- a/src/Model/VoucherTransaction.php
+++ b/src/Model/VoucherTransaction.php
@@ -64,10 +64,10 @@ class VoucherTransaction implements ModelInterface, ArrayAccess, \JsonSerializab
'campaignId' => 'string',
'source' => 'string',
'reason' => 'string',
- 'type' => 'string',
- 'details' => '\OpenAPI\Client\Model\VoucherTransactionDetails',
'relatedTransactionId' => 'string',
- 'createdAt' => '\DateTime'
+ 'createdAt' => '\DateTime',
+ 'details' => '\OpenAPI\Client\Model\VoucherTransactionDetails',
+ 'type' => 'mixed'
];
/**
@@ -84,10 +84,10 @@ class VoucherTransaction implements ModelInterface, ArrayAccess, \JsonSerializab
'campaignId' => null,
'source' => null,
'reason' => null,
- 'type' => null,
- 'details' => null,
'relatedTransactionId' => null,
- 'createdAt' => 'date-time'
+ 'createdAt' => 'date-time',
+ 'details' => null,
+ 'type' => null
];
/**
@@ -102,10 +102,10 @@ class VoucherTransaction implements ModelInterface, ArrayAccess, \JsonSerializab
'campaignId' => true,
'source' => true,
'reason' => true,
- 'type' => true,
- 'details' => true,
'relatedTransactionId' => true,
- 'createdAt' => true
+ 'createdAt' => true,
+ 'details' => true,
+ 'type' => true
];
/**
@@ -200,10 +200,10 @@ public function isNullableSetToNull(string $property): bool
'campaignId' => 'campaign_id',
'source' => 'source',
'reason' => 'reason',
- 'type' => 'type',
- 'details' => 'details',
'relatedTransactionId' => 'related_transaction_id',
- 'createdAt' => 'created_at'
+ 'createdAt' => 'created_at',
+ 'details' => 'details',
+ 'type' => 'type'
];
/**
@@ -218,10 +218,10 @@ public function isNullableSetToNull(string $property): bool
'campaignId' => 'setCampaignId',
'source' => 'setSource',
'reason' => 'setReason',
- 'type' => 'setType',
- 'details' => 'setDetails',
'relatedTransactionId' => 'setRelatedTransactionId',
- 'createdAt' => 'setCreatedAt'
+ 'createdAt' => 'setCreatedAt',
+ 'details' => 'setDetails',
+ 'type' => 'setType'
];
/**
@@ -236,10 +236,10 @@ public function isNullableSetToNull(string $property): bool
'campaignId' => 'getCampaignId',
'source' => 'getSource',
'reason' => 'getReason',
- 'type' => 'getType',
- 'details' => 'getDetails',
'relatedTransactionId' => 'getRelatedTransactionId',
- 'createdAt' => 'getCreatedAt'
+ 'createdAt' => 'getCreatedAt',
+ 'details' => 'getDetails',
+ 'type' => 'getType'
];
/**
@@ -283,33 +283,6 @@ public function getModelName()
return self::$openAPIModelName;
}
- public const TYPE_ACCRUAL = 'POINTS_ACCRUAL';
- public const TYPE_REDEMPTION = 'POINTS_REDEMPTION';
- public const TYPE_REFUND = 'POINTS_REFUND';
- public const TYPE_ADDITION = 'POINTS_ADDITION';
- public const TYPE_REMOVAL = 'POINTS_REMOVAL';
- public const TYPE_EXPIRATION = 'POINTS_EXPIRATION';
- public const TYPE_TRANSFER_IN = 'POINTS_TRANSFER_IN';
- public const TYPE_TRANSFER_OUT = 'POINTS_TRANSFER_OUT';
-
- /**
- * Gets allowable values of the enum
- *
- * @return string[]
- */
- public function getTypeAllowableValues()
- {
- return [
- self::TYPE_ACCRUAL,
- self::TYPE_REDEMPTION,
- self::TYPE_REFUND,
- self::TYPE_ADDITION,
- self::TYPE_REMOVAL,
- self::TYPE_EXPIRATION,
- self::TYPE_TRANSFER_IN,
- self::TYPE_TRANSFER_OUT,
- ];
- }
/**
* Associative array for storing property values
@@ -332,10 +305,10 @@ public function __construct(array $data = null)
$this->setIfExists('campaignId', $data ?? [], null);
$this->setIfExists('source', $data ?? [], null);
$this->setIfExists('reason', $data ?? [], null);
- $this->setIfExists('type', $data ?? [], null);
- $this->setIfExists('details', $data ?? [], null);
$this->setIfExists('relatedTransactionId', $data ?? [], null);
$this->setIfExists('createdAt', $data ?? [], null);
+ $this->setIfExists('details', $data ?? [], null);
+ $this->setIfExists('type', $data ?? [], null);
}
/**
@@ -365,15 +338,6 @@ public function listInvalidProperties()
{
$invalidProperties = [];
- $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)
- );
- }
-
return $invalidProperties;
}
@@ -594,147 +558,137 @@ public function setReason($reason)
}
/**
- * Gets type
+ * Gets relatedTransactionId
*
* @return string|null
*/
- public function getType()
+ public function getRelatedTransactionId()
{
- return $this->container['type'];
+ return $this->container['relatedTransactionId'];
}
/**
- * Sets type
+ * Sets relatedTransactionId
*
- * @param string|null $type type
+ * @param string|null $relatedTransactionId The related transaction ID on the receiving card.
*
* @return self
*/
- public function setType($type)
+ public function setRelatedTransactionId($relatedTransactionId)
{
- if (is_null($type)) {
- array_push($this->openAPINullablesSetToNull, 'type');
+ if (is_null($relatedTransactionId)) {
+ array_push($this->openAPINullablesSetToNull, 'relatedTransactionId');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('type', $nullablesSetToNull);
+ $index = array_search('relatedTransactionId', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $allowedValues = $this->getTypeAllowableValues();
- if (!is_null($type) && !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;
+ $this->container['relatedTransactionId'] = $relatedTransactionId;
return $this;
}
/**
- * Gets details
+ * Gets createdAt
*
- * @return \OpenAPI\Client\Model\VoucherTransactionDetails|null
+ * @return \DateTime|null
*/
- public function getDetails()
+ public function getCreatedAt()
{
- return $this->container['details'];
+ return $this->container['createdAt'];
}
/**
- * Sets details
+ * Sets createdAt
*
- * @param \OpenAPI\Client\Model\VoucherTransactionDetails|null $details details
+ * @param \DateTime|null $createdAt Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
*
* @return self
*/
- public function setDetails($details)
+ public function setCreatedAt($createdAt)
{
- if (is_null($details)) {
- array_push($this->openAPINullablesSetToNull, 'details');
+ if (is_null($createdAt)) {
+ array_push($this->openAPINullablesSetToNull, 'createdAt');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('details', $nullablesSetToNull);
+ $index = array_search('createdAt', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['details'] = $details;
+ $this->container['createdAt'] = $createdAt;
return $this;
}
/**
- * Gets relatedTransactionId
+ * Gets details
*
- * @return string|null
+ * @return \OpenAPI\Client\Model\VoucherTransactionDetails|null
*/
- public function getRelatedTransactionId()
+ public function getDetails()
{
- return $this->container['relatedTransactionId'];
+ return $this->container['details'];
}
/**
- * Sets relatedTransactionId
+ * Sets details
*
- * @param string|null $relatedTransactionId The related transaction ID on the receiving card.
+ * @param \OpenAPI\Client\Model\VoucherTransactionDetails|null $details details
*
* @return self
*/
- public function setRelatedTransactionId($relatedTransactionId)
+ public function setDetails($details)
{
- if (is_null($relatedTransactionId)) {
- array_push($this->openAPINullablesSetToNull, 'relatedTransactionId');
+ if (is_null($details)) {
+ array_push($this->openAPINullablesSetToNull, 'details');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('relatedTransactionId', $nullablesSetToNull);
+ $index = array_search('details', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['relatedTransactionId'] = $relatedTransactionId;
+ $this->container['details'] = $details;
return $this;
}
/**
- * Gets createdAt
+ * Gets type
*
- * @return \DateTime|null
+ * @return mixed|null
*/
- public function getCreatedAt()
+ public function getType()
{
- return $this->container['createdAt'];
+ return $this->container['type'];
}
/**
- * Sets createdAt
+ * Sets type
*
- * @param \DateTime|null $createdAt Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format.
+ * @param mixed|null $type type
*
* @return self
*/
- public function setCreatedAt($createdAt)
+ public function setType($type)
{
- if (is_null($createdAt)) {
- array_push($this->openAPINullablesSetToNull, 'createdAt');
+ if (is_null($type)) {
+ array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('createdAt', $nullablesSetToNull);
+ $index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
- $this->container['createdAt'] = $createdAt;
+ $this->container['type'] = $type;
return $this;
}
diff --git a/src/Model/VoucherTransactionDetails.php b/src/Model/VoucherTransactionDetails.php
index 19ac477..efe70fb 100644
--- a/src/Model/VoucherTransactionDetails.php
+++ b/src/Model/VoucherTransactionDetails.php
@@ -103,7 +103,7 @@ class VoucherTransactionDetails implements ModelInterface, ArrayAccess, \JsonSer
* @var boolean[]
*/
protected static array $openAPINullables = [
- 'balance' => true,
+ 'balance' => false,
'order' => true,
'event' => true,
'earningRule' => true,
@@ -395,14 +395,7 @@ public function getBalance()
public function setBalance($balance)
{
if (is_null($balance)) {
- array_push($this->openAPINullablesSetToNull, 'balance');
- } else {
- $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
- $index = array_search('balance', $nullablesSetToNull);
- if ($index !== FALSE) {
- unset($nullablesSetToNull[$index]);
- $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
- }
+ throw new \InvalidArgumentException('non-nullable balance cannot be null');
}
$this->container['balance'] = $balance;
diff --git a/src/Model/VoucherTransactionDetailsBalance.php b/src/Model/VoucherTransactionDetailsBalance.php
index de6b735..6632013 100644
--- a/src/Model/VoucherTransactionDetailsBalance.php
+++ b/src/Model/VoucherTransactionDetailsBalance.php
@@ -64,6 +64,7 @@ class VoucherTransactionDetailsBalance implements ModelInterface, ArrayAccess, \
'object' => 'string',
'points' => 'int',
'balance' => 'int',
+ 'operationType' => 'string',
'relatedObject' => '\OpenAPI\Client\Model\VoucherTransactionDetailsBalanceRelatedObject'
];
@@ -80,6 +81,7 @@ class VoucherTransactionDetailsBalance implements ModelInterface, ArrayAccess, \
'object' => null,
'points' => null,
'balance' => null,
+ 'operationType' => null,
'relatedObject' => null
];
@@ -94,6 +96,7 @@ class VoucherTransactionDetailsBalance implements ModelInterface, ArrayAccess, \
'object' => true,
'points' => true,
'balance' => true,
+ 'operationType' => true,
'relatedObject' => true
];
@@ -188,6 +191,7 @@ public function isNullableSetToNull(string $property): bool
'object' => 'object',
'points' => 'points',
'balance' => 'balance',
+ 'operationType' => 'operation_type',
'relatedObject' => 'related_object'
];
@@ -202,6 +206,7 @@ public function isNullableSetToNull(string $property): bool
'object' => 'setObject',
'points' => 'setPoints',
'balance' => 'setBalance',
+ 'operationType' => 'setOperationType',
'relatedObject' => 'setRelatedObject'
];
@@ -216,6 +221,7 @@ public function isNullableSetToNull(string $property): bool
'object' => 'getObject',
'points' => 'getPoints',
'balance' => 'getBalance',
+ 'operationType' => 'getOperationType',
'relatedObject' => 'getRelatedObject'
];
@@ -261,7 +267,10 @@ public function getModelName()
}
public const TYPE_LOYALTY_CARD = 'loyalty_card';
+ public const TYPE_GIFT_VOUCHER = 'gift_voucher';
public const OBJECT_BALANCE = 'balance';
+ public const OPERATION_TYPE_MANUAL = 'MANUAL';
+ public const OPERATION_TYPE_AUTOMATIC = 'AUTOMATIC';
/**
* Gets allowable values of the enum
@@ -272,6 +281,7 @@ public function getTypeAllowableValues()
{
return [
self::TYPE_LOYALTY_CARD,
+ self::TYPE_GIFT_VOUCHER,
];
}
@@ -287,6 +297,19 @@ public function getObjectAllowableValues()
];
}
+ /**
+ * Gets allowable values of the enum
+ *
+ * @return string[]
+ */
+ public function getOperationTypeAllowableValues()
+ {
+ return [
+ self::OPERATION_TYPE_MANUAL,
+ self::OPERATION_TYPE_AUTOMATIC,
+ ];
+ }
+
/**
* Associative array for storing property values
*
@@ -302,11 +325,12 @@ public function getObjectAllowableValues()
*/
public function __construct(array $data = null)
{
- $this->setIfExists('type', $data ?? [], 'loyalty_card');
+ $this->setIfExists('type', $data ?? [], null);
$this->setIfExists('total', $data ?? [], null);
$this->setIfExists('object', $data ?? [], 'balance');
$this->setIfExists('points', $data ?? [], null);
$this->setIfExists('balance', $data ?? [], null);
+ $this->setIfExists('operationType', $data ?? [], null);
$this->setIfExists('relatedObject', $data ?? [], null);
}
@@ -346,10 +370,6 @@ public function listInvalidProperties()
);
}
- if (!is_null($this->container['type']) && !preg_match("/loyalty_card/", $this->container['type'])) {
- $invalidProperties[] = "invalid value for 'type', must be conform to the pattern /loyalty_card/.";
- }
-
$allowedValues = $this->getObjectAllowableValues();
if (!is_null($this->container['object']) && !in_array($this->container['object'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
@@ -359,8 +379,13 @@ public function listInvalidProperties()
);
}
- if (!is_null($this->container['object']) && !preg_match("/balance/", $this->container['object'])) {
- $invalidProperties[] = "invalid value for 'object', must be conform to the pattern /balance/.";
+ $allowedValues = $this->getOperationTypeAllowableValues();
+ if (!is_null($this->container['operationType']) && !in_array($this->container['operationType'], $allowedValues, true)) {
+ $invalidProperties[] = sprintf(
+ "invalid value '%s' for 'operationType', must be one of '%s'",
+ $this->container['operationType'],
+ implode("', '", $allowedValues)
+ );
}
return $invalidProperties;
@@ -417,11 +442,6 @@ public function setType($type)
)
);
}
-
- if (!is_null($type) && (!preg_match("/loyalty_card/", $type))) {
- throw new \InvalidArgumentException("invalid value for \$type when calling VoucherTransactionDetailsBalance., must conform to the pattern /loyalty_card/.");
- }
-
$this->container['type'] = $type;
return $this;
@@ -440,7 +460,7 @@ public function getTotal()
/**
* Sets total
*
- * @param int|null $total The number of all points accumulated on the card as affected by add or subtract operations.
+ * @param int|null $total The number of all points or credits accumulated on the card as affected by add or subtract operations.
*
* @return self
*/
@@ -500,11 +520,6 @@ public function setObject($object)
)
);
}
-
- if (!is_null($object) && (!preg_match("/balance/", $object))) {
- throw new \InvalidArgumentException("invalid value for \$object when calling VoucherTransactionDetailsBalance., must conform to the pattern /balance/.");
- }
-
$this->container['object'] = $object;
return $this;
@@ -523,7 +538,7 @@ public function getPoints()
/**
* Sets points
*
- * @param int|null $points Points added or subtracted in the transaction.
+ * @param int|null $points Points added or subtracted in the transaction of a loyalty card.
*
* @return self
*/
@@ -557,7 +572,7 @@ public function getBalance()
/**
* Sets balance
*
- * @param int|null $balance The available points on the card after the transaction as affected by redemption or rollback.
+ * @param int|null $balance The available points or credits on the card after the transaction as affected by redemption or rollback.
*
* @return self
*/
@@ -578,6 +593,50 @@ public function setBalance($balance)
return $this;
}
+ /**
+ * Gets operationType
+ *
+ * @return string|null
+ */
+ public function getOperationType()
+ {
+ return $this->container['operationType'];
+ }
+
+ /**
+ * Sets operationType
+ *
+ * @param string|null $operationType The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.
+ *
+ * @return self
+ */
+ public function setOperationType($operationType)
+ {
+ if (is_null($operationType)) {
+ array_push($this->openAPINullablesSetToNull, 'operationType');
+ } else {
+ $nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
+ $index = array_search('operationType', $nullablesSetToNull);
+ if ($index !== FALSE) {
+ unset($nullablesSetToNull[$index]);
+ $this->setOpenAPINullablesSetToNull($nullablesSetToNull);
+ }
+ }
+ $allowedValues = $this->getOperationTypeAllowableValues();
+ if (!is_null($operationType) && !in_array($operationType, $allowedValues, true)) {
+ throw new \InvalidArgumentException(
+ sprintf(
+ "Invalid value '%s' for 'operationType', must be one of '%s'",
+ $operationType,
+ implode("', '", $allowedValues)
+ )
+ );
+ }
+ $this->container['operationType'] = $operationType;
+
+ return $this;
+ }
+
/**
* Gets relatedObject
*
diff --git a/src/Model/VoucherTransactionDetailsBalanceRelatedObject.php b/src/Model/VoucherTransactionDetailsBalanceRelatedObject.php
index db6ddb9..59faede 100644
--- a/src/Model/VoucherTransactionDetailsBalanceRelatedObject.php
+++ b/src/Model/VoucherTransactionDetailsBalanceRelatedObject.php
@@ -305,10 +305,6 @@ public function listInvalidProperties()
);
}
- if (!is_null($this->container['type']) && !preg_match("/voucher/", $this->container['type'])) {
- $invalidProperties[] = "invalid value for 'type', must be conform to the pattern /voucher/.";
- }
-
return $invalidProperties;
}
@@ -337,7 +333,7 @@ public function getId()
/**
* Sets id
*
- * @param string|null $id Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API.
+ * @param string|null $id Identifies the voucher that is being modified. The ID is assigned by the Voucherify API.
*
* @return self
*/
@@ -397,11 +393,6 @@ public function setType($type)
)
);
}
-
- if (!is_null($type) && (!preg_match("/voucher/", $type))) {
- throw new \InvalidArgumentException("invalid value for \$type when calling VoucherTransactionDetailsBalanceRelatedObject., must conform to the pattern /voucher/.");
- }
-
$this->container['type'] = $type;
return $this;
diff --git a/src/Model/VouchersBalanceUpdateResponseBody.php b/src/Model/VouchersBalanceUpdateResponseBody.php
index 890bd41..6f59406 100644
--- a/src/Model/VouchersBalanceUpdateResponseBody.php
+++ b/src/Model/VouchersBalanceUpdateResponseBody.php
@@ -560,7 +560,7 @@ public function getOperationType()
/**
* Sets operationType
*
- * @param string|null $operationType operationType
+ * @param string|null $operationType The type of the operation being performed.
*
* @return self
*/